Unparseable date: "2013-07-11T13:41:22.000Z" (at offset 23)

try using

String DATE_FORMAT_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"

The Z at the end is usually the timezone offset. If you you don't need it maybe you can drop it on both sides.


Use X instead of Z at the end of the format string:

yyyy-MM-dd'T'HH:mm:ss.SSSX

to parse ISO-8601 format timezone offsets.

(Only works if you use Java 7. See this question).


The Z in your time string is not a valid timezone identifier, but the time format you specified expects a time zone identifier there. More specifically, it expects a RFC 822 timezone identifier, which is usually 4 digits long.

Tags:

Java