I managed to parse a String to a LocalDate object:
DateTimeFormatter f1=DateTimeFormatter.ofPattern(\"dd MM yyyy\");
LocalDate d=Lo
You need to use capital HH in the pattern
DateTimeFormatter f2=DateTimeFormatter.ofPattern("HH mm");
or do this, for clock-hour-of-am-pm you need to specify it.
This should also work
DateTimeFormatter f2=DateTimeFormatter.ofPattern("hh mm a");
LocalTime t=LocalTime.parse("11 08 AM",f2); //exception here