File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Adding date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Adding date" Watch "Adding date" New topic

Adding date

Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
Hello friend..

What should i do to add 18 years to a birthdate (1988-04-24) and find out the date:
i.e, (1988-04-24)+18 years = output date (yyyy-mm-dd)

Pliz help.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63867

Manoj Paul, please take the time to choose the correct forum for your posts. This forum is for questions on XYZ.

Also, "Pliz" is not a word. Please use real words such as "Please" when posting to the forums. Please read this for more information.

This post has been moved to a more appropriate forum.
[ May 08, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
The Calendar class should do what you need.

I agree. Here's the link:
subject: Adding date
It's not a secret anymore!