This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 41149
    
  45
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 - my free Android networking tools app
Jessica James
Ranch Hand

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

Thanks for your reply..

Regards,
Jessica
 
Don't get me started about those stupid light bulbs.
 
subject: String to Date?
 
Similar Threads
converting date string into Calendar.Day of Year
String to Date conversion
String conversion
how to convert String into Date format
How to store datetimepicker value into database