File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add 1 day to a date?

 
myron schabe
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I add just one day to a Date object?
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a search through these forums. This topic has been covered numerous times, and quite recently as well.
hth,
bear
 
David Duran
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't try compiling this but:
GregorianCalendar cal = new GregorianCalendar()
cal.add(Calendar.DAY_OF_MONTH, 1);
Date d = cal.getTime();
If you have your own Date object perhaps passed in as a parameter then you can set the time:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic