Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Experimentation for Engineers: From A/B testing to Bayesian optimization
this week in the
Design
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
check time on runtime
obaid abbassi
Ranch Hand
Posts: 118
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
i am developing an app of tracking employees
I want to track the time of employee when he log out
i want to set time 8:00 AM to 4:00pm whenever employee want to logout before 4:00pm user will get alert
basically i want to compare time on run time.
so how to do it
i also tried isBefore() and isAfter() but in my case it always return true.
Tim Moores
Bartender
Posts: 7488
171
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
Post the code you have, and tell us what it does and doesn't do correctly.
obaid abbassi
Ranch Hand
Posts: 118
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
String
time="4:00pm";
simply i want to compare it with run time current time
whether time is less than current time or greater than current time etc
Tim Moores
Bartender
Posts: 7488
171
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
A string does you no good. From Android 8 onwards you can use the java.time package for working with time; start reading here:
https://docs.oracle.com/javase/tutorial/datetime/TOC.html
Stephan van Hulst
Saloon Keeper
Posts: 14795
333
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
I've left the office at 2 AM more than once. What should the app do in those cases?
obaid abbassi
Ranch Hand
Posts: 118
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
2 AM is not allowed time
Paul Clapham
Marshal
Posts: 27590
88
I like...
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
obaid abbassi wrote:
2 AM is not allowed time
And so your explanation of what the app should do, given that rule, is...
Armando Lewis
Greenhorn
Posts: 4
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think it can be done sooner. at 3 o'clock in the morning for example. see more
car parking multiplayer hack speed
by techbigs
Steve Langford Dixit
Greenhorn
Posts: 9
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
without your code, it is difficult to explain
Die Fledermaus does not fear such a tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
9 1 1
Unix OS on Windows Vista ?
Input / output
Timesheet Program
SEVERE: BAD packet signature 200,SEVERE: Caught exception (java.lang.NullPointerException)
More...