java - wrong date in SimpleDateTime parse -


This is the string I have:

  Sat, Nov 02, 2013 at 5: 10 pm   

I am trying to parse it in a date time using this formater:

  DateFormat formatter = new SimpleDateFormat ( However, this is when I use it to parse the date string:   

However, this is when I use it to parse the date string:

  Sat Jan 05 17:10:00 CST 2013   

I think I should make the format wrong Yes, but I did not know where it is.

Capital YYYY There is some name format. You want lowercase yyyy for the actual year.

DateFormat formatter = New SimpleDateform ("E: EEE, MMM DD, yyyy ' 'K: mm A');

With this change I output and receive the parsed date:

  Sat 02 02 17:10:00 PDT 2013 < / Code>  

(I'm in the Pacific Time Zone.)

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -