This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String to Date? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String to Date?" Watch "String to Date?" New topic
Author

String to Date?

Jessica James
Ranch Hand

Joined: Jan 23, 2007
Posts: 69
Hi Friends,

How to convert a String to a Date field?
what is the format of String to convert it to date..

Regards,
jessica
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
The java.text.SimpleDateFormat class does this. The code would be something like:

The javadocs for that class list the other possibilities to specify the date and time format.


Ping & DNS - updated with new look and Ping home screen widget
Jessica James
Ranch Hand

Joined: Jan 23, 2007
Posts: 69
Hi Ulf,

Thanks for your reply..

Regards,
Jessica
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String to Date?
 
Similar Threads
converting date string into Calendar.Day of Year
String conversion
how to convert String into Date format
How to store datetimepicker value into database
String to Date conversion