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:
Tim Cooke
Campbell Ritchie
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Java in General
Date Format Issues
Steve Dyke
Ranch Hand
Posts: 2278
2
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I do I fix the following when the date from my source is say 01/01/09 I get a result of 01/01/0009.
SimpleDateFormat dateFormatter = new SimpleDateFormat( "MM/dd/yyyy" ); Date startDate = dateFormatter.parse( rsa.getString("psdatem") );
Dan Murphy
Ranch Hand
Posts: 126
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think if you specify the year as yy (instead of yyyy) it will parse 09 to 2009.
SCJP, SCJD, SCWCD
bart zagers
Ranch Hand
Posts: 234
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The exact behavior is explained in the
SimpleDateFormat
documentation.
Steve Dyke
Ranch Hand
Posts: 2278
2
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks, works great.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem in Coverting one Date Format to Other date Format
simpleDateFormat Problems and questions
Date 01/01/1970 returning non-zero value for time
how to convert date to a string
DateFormat Error
More...