Unable to obtain LocalDateTime from TemporalAccessor when parsing LocalDateTime (Java 8)
I am simply trying to convert a date string into a DateTime object in Java 8. Upon running the following lines: DateTimeFormatter formatter = DateTimeFormatter.ofPattern(“yyyyMMdd”); LocalDateTime dt = LocalDateTime.parse(“20140218”, formatter); I get the following error: Exception in thread “main” java.time.format.DateTimeParseException: Text ‘20140218’ could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to … Read more