Human readable and parsable date format in Java.
Posted
by Savvas Dalkitsis
on Stack Overflow
See other posts from Stack Overflow
or by Savvas Dalkitsis
Published on 2009-09-23T20:49:09Z
Indexed on
2010/04/16
22:13 UTC
Read the original article
Hit count: 352
I want to save a Date object to a readable string (for example 22/10/2009 21:13:14) that is also parsable back to a Date object.
I have tried many things and the best I could find was to use DateFormater for parsing and formating but it has a setback. When you format a date you lose seconds information. I tried to find if there is an option to format it and display the seconds (even better would be to the millisecond level since that's the resolution the Date object allows you to have) but I came up short.
Any ideas?
© Stack Overflow or respective owner