aspose file tools*
The moose likes Beginning Java and the fly likes Displaying Date in Format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Displaying Date in Format "mm/dd/yyyy"" Watch "Displaying Date in Format "mm/dd/yyyy"" New topic
Author

Displaying Date in Format "mm/dd/yyyy"

payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
Hi,
I get a date object as 2008-09-26 and need to be formatted in mm/dd/yyyy format.
i tried with simple date format
which gives mee result as 00/26/2008
can any one tell me why this is happening??
my code is:
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

You should use MM for months - mm is for minutes.


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: Displaying Date in Format "mm/dd/yyyy"