Trying to store date time from excel to setter using poi and LocalDateTime and DateTimeFormatter.
DateTimeFormatter format=DateTimeFormatter.ofPattern("MM/dd/yyyy hh:mm:ss");
LocalDateTime
dateObj=LocalDateTime.parse(row.getCell(2).getLocalDateTimeCellValue().toString(),format);
dto.setDate(dateObj);
The output is:
java.time.format.DateTimeParseException: Text '2023-01-22T00:00' could not be parsed at index 2
Please advise me what to do? In the excel file the date is stored in 1/22/2023 12:00:00 AM