I have this code:
private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
Now, I try to format check some String data,
final String format = SIMPLE_DATE_FORMAT.format("2022-12-07T10:57:23.970Z");
I get the error that Cannot format the given Object as a Date. Whats the issue here and how do I resolve it?