aspose file tools*
The moose likes Java in General and the fly likes Need your help in DATE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need your help in DATE" Watch "Need your help in DATE" New topic
Author

Need your help in DATE

Deepa Balasubramanayam
Ranch Hand

Joined: Mar 29, 2001
Posts: 39
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

Joined: Jan 09, 2001
Posts: 1492
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

Joined: Oct 18, 2000
Posts: 4121

Try this :



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

HTH,
-Nate

-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need your help in DATE