File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Adding integer to Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Adding integer to Date" Watch "Adding integer to Date" New topic
Author

Adding integer to Date

Rahul Ghai
Greenhorn

Joined: Nov 03, 2000
Posts: 21
How can i add any integer number to a date? For example adding 20 to 12-11-2001 to get the result 02-12-2001.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Avoiding any deprecated calls,And don't fall into the trap ofThis code will bite you when you're going from summer time to winter time or vice versa.
- Peter
Rahul Ghai
Greenhorn

Joined: Nov 03, 2000
Posts: 21
Thanks for the solution Peter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding integer to Date
 
Similar Threads
howto compare date ?
How to get date of next anniversary ?
converting to date format
converting date strings
How to calculate date in Java