It's not a secret anymore!
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


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
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
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.
Jessica James
Ranch Hand

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

Thanks for your reply..

Regards,
Jessica
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: String to Date?
 
jQuery in Action, 3rd edition