Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing the month dynamically for Calender

807580Feb 15 2010 — edited Feb 15 2010
Hi,

I have date which is fetched from Database, which is in this format "dd/mm/yyyy" those value is 10/02/2010.
I have parsed these values and now using Calender class, i need to add another 110 days to it. Hence the final result should be 30/05/2010 (30th May, 2010)
Hence i thought of using Calender.add(Calender.DAY_OF_MONTH,110); this will fetch the right results, but i shouldnot hardcode the month as it is coming from DB(it can be any month). Hence i tried using the Calender.add(Calender.FEBRUARY,110) that doesnot work eitheir same is the case with
Calender.add(2,110) , here "2" is for the month of "FEB". Is there any way to pass the month and the day (coming from DB) along with the amount (110 days) to get the final date? Please shed some light into this.

Thanks,
Rithu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2010
Added on Feb 15 2010
15 comments
383 views