The below code throws error, not sure why 1 is not accepted as 01 and throws exception
failure Text '1/1/2020 12:12:12' could not be parsed at index 0
1/1/2020 12:12:12 MM/dd/yyyy HH:mm:ss
try {
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss", Locale.US)
.withResolverStyle(ResolverStyle.STRICT);
System.out.println("success " + dateFormatter.parse(1/1/2020 12:12:12));
} catch (Exception e) {
System.out.println("failure " + e.getMessage());
}