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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Need your help in DATE
 
Similar Threads
xml date conversion all date conversions
Tomcat showing wrong date
jdbc date object
Customize date liferay-ui.tld
Regarding the date obtained using java.util.Date class