GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Date Conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date Conversion" Watch "Date Conversion" New topic
Author

Date Conversion

Josweth Reddy
Ranch Hand

Joined: Nov 02, 2005
Posts: 30
Dear Frinds !!

I have a date in dd/mm/yy format.I need to add one year to this date and have to subtract one day.

Im greatful if you post your views/sugestions.

Thanks in advance,
Josweth Reddy T
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14193
    
  20

Look at the class java.text.SimpleDateFormat for parsing a String to a Date or formatting a Date to a String.

Look at java.util.Calendar for doing calculations with dates (like adding a year, subtracting a day etc.).

(This question doesn't belong in the "Advanced Java" forum).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
GeeCON Prague 2014
 
subject: Date Conversion