Forums Register Login

Receiving ParseException with String containing ISO 8601 Formatted Date using Java 1.6

+Pie Number of slices to send: Send
Keep getting a ParseException when I try to parse a ISO 8601 formatted String into a Java Date type.



Keeps returning a ParseException:

Unparseable date: "2014-07-04T22:59:36Z"

What am I possibly doing wrong?
+Pie Number of slices to send: Send
Andre,
Your date string contains seconds.
Your format pattern does not.

Good Luck,
Avi.
+Pie Number of slices to send: Send
Welcome to the Ranch

Always tell us if you post elsewhere; you actually got the answer on the other forum first, so you should tell us that, too.
I knew I would regret that burrito. But this tiny ad has never caused regrets:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 582 times.
Similar Threads
Converting string to specific date format
A SimpleDateFormat for ISO 8601
String convert in to Date format
Oracle Date convert to java timestamp with new timezone
Handling a strange date format
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:41:50.