When I try to run the following code:
LocalTime test = LocalTime.parse("8:00am", DateTimeFormatter.ofPattern("hh:mma"));
I get this:
Exception in thread "main" java.time.format.DateTimeParseException: Text '8:00am' could not be parsed at index 0
Any idea why this might be happening?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With