Sunday, 29 September 2013

Java: How to convert string with month name to DateTime?

Java: How to convert string with month name to DateTime?

I've seen answers that let me convert when the format is like
"14/02/1952 14:52:22"
by using DateTimeFormatter
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy
HH:mm:ss");
DateTime dt = formatter.parseDateTime(string);
How do I apply the same idea to strings of this format:
"Sunday, September 29, 2013 7:59:58 AM PDT"

No comments:

Post a Comment