0

Is it possible to parse date like 2022-01-20T09:08:42.518925 using @JsonFormat annotation?

@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS") gets me parsing error.

And furthermore can I make milliseconds part optional? Like [.SSSSSS]

Evillain
  • 101
  • 1
  • 7

1 Answers1

0

I think it's not possible to parse that amount of milliseconds. I leave you a post where they explain it quite well: Java date parsing with microsecond or nanosecond accuracy

Pablo Aragonés
  • 361
  • 6
  • 16