A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
constructing Date objects
David Jon
Greenhorn
Joined: Feb 16, 2001
Posts: 17
posted
Apr 25, 2001 10:39:00
0
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
posted
Apr 25, 2001 10:48:00
0
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?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter