How can I get correct date time from sheet
vovan4yk opened this issue · 7 comments
I have document with date column
I'm trying to get list objects with different date time for month, and in general it looks ok, except of such value as in screen, using the latest version poiji
using:
private LocalDateTime date;
and
var options = settings()
.sheetIndex(2)
.headerStart(8)
.dateTimeFormatter(DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss"))
.build();
fromExcel(new File(filePath), type, options);
and always get +1 hour for this time, strange that's only works for 3am for 03.26
Thank you for contributing to Poiji! Feel free to create a PR If you want to contribute directly :)
Hi @vovan4yk , could you share your file so we can pinpoint the problem?
HI @ozlerhakan
test.xlsx
problem dates are 3/26/2023 only for 3am(e.g. 03/26/2023 03:30:18 is present as 03/26/2023 04:30:18)
when read objects list via fromExcel() method
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I haven't checked it yet. Ping it for the stale bot
Hi @vovan4yk ,
Some values in the date column seem to be incorrectly defined, See:
Apart from that, could you use the following number format for your excel process:
PoijiNumberFormat numberFormat = new PoijiNumberFormat();
numberFormat.putNumberFormat((short) 14, "mm/dd/yyyy HH:mm:ss");
Let me know if it doesn't fix your problem.