This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 13875
    
  10

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 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Conversion
 
Similar Threads
future date validation
add one day to current date
comparision between two dates
Getting error while inserting data into table
sql date and time - how I construct one date out of them?