Fri Oct 24, 2008 7:47 pm
How to add days to a particular date (say 8/31/2007) in Java? I am
aware of DATE and CALENDAR Objects in Java but not sure about methods.
Fri Oct 24, 2008 7:50 pm
Date Arithmetic function. Adds the specified (signed) amount of time
to the given time field, based on the calendar's rules. For example,
to subtract 5 days from the current time of the calendar, you can
achieve it by calling:
add(Calendar.DATE, -5).
or to add 1 month to current date use this snippet
add(Calendar.MONTH,1)
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.