Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Date in Format "mm/dd/yyyy"

 
payal Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should use MM for months - mm is for minutes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic