File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
parsing string to date
Joined: Apr 13, 2011
Aug 16, 2011 03:54:23
I just want to ask if how can I convert this string " 11-15-2011" to yjis date format "11-Nov-2011"
Thank you and best regards
Joined: Jul 20, 2011
Aug 16, 2011 04:04:39
Use the class
Heres the doc with good examples:
Oh i just re-read your question. Where do you get the initial string from?
If your not getting it from a Date object, you might convert it with a custom method
by splitting and re-arranging the string.
Knowledge Reigns Supreme
Joined: Oct 27, 2005
Aug 16, 2011 04:14:49
Or use two
objects - one for parsing into a Date, the other for formatting that Date back into a String.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: parsing string to date
how to set 2011-11-06T14:34:16.679+02:00 into XMLGregorianCalendar
java date format stored as varchar - need to convert it into date
SimpleDateFormat not returning expectec output?
Display date format by calendar entry
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015