Joda Time: Invalid format. Data is malformed
Your Format must be:
DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZ");
It must be exactly like the date string, with the fixed values escaped by single quotes and without additional blanks.
Also you have to use HH
for 24 hours Format. hh is 12 hours Format and it starts at 1 and Ends on 12
This happens because the string you are trying to parse contains a T
, which is not in the format string.
You are trying to parse a string which is in the standard ISO 8601 format. You do not need a custom date format string for this, because Joda Time already supports this format by default. Just do:
DateTime jodaTime = DateTime.parse(transactionDateValue);