ниже приведен формат даты и времени
DateTimeFormatter dtf2 = new DateTimeFormatterBuilder().parseCaseInsensitive()
.append(DateTimeFormatter.ofPattern("dd-MMM-yyyy")).toFormatter();
LocalDate tempDate01;
ошибка возникает по адресу:
tempDate01=LocalDate.parse(stockFileLines.get(0).split(",")[2].trim(),dtf2);
отображается следующая ошибка
Exception in thread "main" java.time.format.DateTimeParseException: Text '04-Sep-2023' could not be parsed at index 3
как видно, строка соответствует формату, но выдает ошибку
Я также пробовал тестировать со следующим кодом
tempDate01=LocalDate.parse("04-Sep-2023",dtf2);
Подробнее здесь: https://stackoverflow.com/questions/787 ... ext-04-sep
Мобильная версия