This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I set the time back 24hours?

 
Dan Acuff
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic