Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get correct date time from sheet #297

Closed
vovan4yk opened this issue Nov 10, 2023 · 7 comments
Closed

How can I get correct date time from sheet #297

vovan4yk opened this issue Nov 10, 2023 · 7 comments

Comments

@vovan4yk
Copy link

vovan4yk commented Nov 10, 2023

image
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

Copy link

Thank you for contributing to Poiji! Feel free to create a PR If you want to contribute directly :)

@ozlerhakan
Copy link
Owner

Hi @vovan4yk , could you share your file so we can pinpoint the problem?

@vovan4yk
Copy link
Author

vovan4yk commented Nov 10, 2023

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

Copy link

stale bot commented Dec 15, 2023

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.

@stale stale bot added the bot label Dec 15, 2023
@ozlerhakan
Copy link
Owner

I haven't checked it yet. Ping it for the stale bot

@stale stale bot removed the bot label Dec 17, 2023
@ozlerhakan
Copy link
Owner

ozlerhakan commented Dec 25, 2023

Hi @vovan4yk ,

Some values in the date column seem to be incorrectly defined, See:
broken-format-date

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");

@ozlerhakan
Copy link
Owner

Let me know if it doesn't fix your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants