-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Year Issue #292
Comments
Could you give a try the following statements for PoijiNumberFormat:
|
I am using Java8, com.github.ozlerhakan', name: 'poiji', version: '3.1.0', and 'org.apache.poi', name: 'poi', version: '5.1.0' Using PoijiNumberFormat numberFormat - actually gives me wrong date. Instead of 10/16/1918 - I get 9/15/18 datePattern(format).dateTimeFormatter(ISO_DATE_TIME) - gives me correct date - but 19 is missing from the year. I am getting 10/16/18 instead of 10/16/1918 |
Interesting.. It seems to be fixed with the suggestion above in the latest Poiji - v4.1.1 on my laptop. Could you share your excel if It's possible? |
I am using poiji 3.10. Whats the highest evel of Poiji I can use on JDK 8? |
3.1.7 should be compatible with Java 8. |
That one is. Thats what I am using. Is 4.1.1 compatible with Java 8? Seems like issue might be with 3.17 |
No, it works with Java 11. |
So is there any fix for 3.1.7 for year issue? |
I'll look into your case with the release supporting Java 8. |
Thank you so much for your help |
It seems we're trying to manipulate the wrong index from the internal list. Could you try out the following statement only:
|
That does it. Thank you so much. |
Great! No problem! |
I am reading date from excel in format - d/m/yyyy. For example 10/16/1918
But when I read in Java it comes back as 10/16/18 and using dateformatting it gets converted to 10/16/2018.
I have tried various options but in all cases only "YY" part is read. Below are few things I have tried. In java pojo - date is deined as string
@ExcelCell(6)
private String dob;
PoijiNumberFormat numberFormat = new PoijiNumberFormat();
numberFormat.putNumberFormat((short) 47, "dd/M/yyyy");
OR
PoijiOptions options = PoijiOptions.PoijiOptionsBuilder.settings().datePattern("M/d/yyyy").build();
Any help will very much appreciated.
The text was updated successfully, but these errors were encountered: