aspose file tools
The moose likes Beginning Java and the fly likes constructing Date objects Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "constructing Date objects" Watch "constructing Date objects" New topic
Author

constructing Date objects

David Jon
Greenhorn

Joined: Feb 16, 2001
Posts: 17
Hi, does anyone know how I can construct a Date object from a string that is in the form dd/mm/yyyy. The constructor Date(String s) has unfortunately been deprecated.
Help is much appreciated.
thanks,
dj.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi David,
Look into the java.text.SimpleDateFormat. You can use its parse method to get string into date.
Regards,
Manfred.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: constructing Date objects
 
Similar Threads
JDBC SQL server date format problem
how to convert String into Date format
Help:java.lang.String and java.sql.Date
first date and last date of month
How can I get sysdate in java?