aspose file tools*
The moose likes JDBC and the fly likes increment date by 6 days Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "increment date by 6 days" Watch "increment date by 6 days" New topic
Author

increment date by 6 days

nabou diack
Greenhorn

Joined: Oct 17, 2001
Posts: 13
hi I would like to know how to increment a date received from an access database by 6 more days. thanks
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You will need the java.util.GregorianCalendar and java.text.SimpleDataFormat classes. After formatting your date you can use the gregorianCalendat class to increment the days.


------------------
Bosun
SCJP for the Java� 2 Platform


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I don't think you need a SimpleDateFormat?

I find this the easiest method, but I still think the whole Date/Calendar/DateFormat thing is way too hard to use.
Jamie
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You are correct Jamie. SimpleDateFormat is not needed.


------------------
Bosun
SCJP for the Java� 2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: increment date by 6 days