I try to user LocalDateTime and DateTimeFormatter and try to parse this String:
2020-04-28 and time: 12:37:49.863
But throws DateTimeParseException
This is code fragment:
String line = "2020-04-28 and time: 12:37:49.863";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd 'and time: 'hh:mm:ss.SSS");
LocalDateTime localDateTime = LocalDateTime.parse(line, formatter);
Why does it occours?