I have a string came from an API call. The string is in the formate of 2021-02-12T13:48:15-05:00
.
I want to convert it into java date object. I try to use Date.valueOf(..)
, but it throws IllegalArgumentException.
I checked the other posts, seems like I need to specific the format of my string, like new SimpleDateFormat("MM/dd/yyyy")
.
But, I am not sure how to format this string. Can I get some help?
Thanks