Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Java in General
How to convert Date.toString back to Date
Tay Thotheolh
Ranch Hand
Posts: 84
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi. I used the following codes below:
java.util.Date today = new java.util.Date(); //Getting current Data/Time String currentDT = today.toString(); System.out.println(currentDT);
It's output is "Sun Mar 07 15:08:18 GMT 2010".
How do I convert this toString() output into a java.util.Date object ?
Jeremy Wilson
Ranch Hand
Posts: 166
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you taken a look at
java.text.SimpleDateFormat
Jeremy Wilson
bhanu chowdary
Ranch Hand
Posts: 256
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When ever you have a difficulty regarding dates, go through the api of java.util.Date, java.util.Calendar, java.text.SimpleDateFormat . I am sure you will find a way.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to convert java.util.date to java.sql.date
java.util.Date to java.sql.Date
XSD TYPE dateTime - returns XMLGregorian calendar- how to convert into java.util.Date
How can I solve IllegalArgumentException
util.Date to sql.Date
More...