I am working on ThreeTenABP library to parse date and time. However, it is crashing. API I consume sends DateTime like;
2018-10-20T14:27:47.3949709+03:00
This is the way I try to parse;
DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
.append(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
.toFormatter();
Timber.d(LocalDateTime.parse("2018-10-20T14:27:47.3949709+03:00", formatter).toString());
I am getting below error:
Text '2018-10-20T14:27:47.3949709+03:00' could not be parsed at index 33
Thanks in advance.