GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes How do I  set the time back 24hours? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I  set the time back 24hours?" Watch "How do I  set the time back 24hours?" New topic
Author

How do I set the time back 24hours?

Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62
I have the following code I have scraped together but it gives me the time now.

How do I set it back 25 hours?

marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

See the API documentation for Calendar's add method...
Adds or subtracts the specified amount of time to the given calendar field, based on the calendar's rules...


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
GeeCON Prague 2014
 
subject: How do I set the time back 24hours?