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

Need your help in DATE

 
Deepa Balasubramanayam
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a doubt in date. I am passing date values in mm/dd/yy format and storing it in the database(MSAccess). But when i am displaying it in the screen i want it like this Apr 24, 2001. Can you tell me how can i do this.
Thanks
Deepa
------------------
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepa,
Look at java.text.SimpleDateFormat!
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat( "MMM dd, yyyy" );
System.out.println( sdf.format( d ) );
Regards,
Manfred.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this :



Look up java.text.SimpleDateFormat in the APIs if you want more information and options on formatting dates.

HTH,
-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic