Bug 66904 - Function DAYS not parsing German or French string dates
Summary: Function DAYS not parsing German or French string dates
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 5.2.3-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-14 13:38 UTC by Marc Guillemot
Modified: 2023-10-17 17:34 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Guillemot 2023-08-14 13:38:08 UTC
The function _days_ works fine with cells containing dates as numbers but not with cells containing dates as strings with for instance a German (dd.mm.yyy) or French (dd/mm/yyyy) pattern.

The root of the problem is probably in org.apache.poi.ss.usermodel.DateUtil.parseDateTime. Trying to parse with DateTimeFormatter.ISO_LOCAL_DATE first would mitigate the problem but according to my tests, a German version of Excel parses string dates in different formats.