Regression: v2.2.1 returns date field as an integer but used to be datetime field in any previous versions

Issue #447 resolved
C. W.
created an issue


Please refer to the attached spread sheet. via openpyxl, cell('A2') used to return ‘2014-12-25 00:00:00’ but v2.2.1 returns 41998.

Please have a look.


Comments (6)

  1. CharlieC

    The custom number formats are not parsing as relating to datetime values. Unfortunately, Excel treats datetimes as numbers unless the formatting is right and we use the same logic in openpyxl. I don't know what created the file but saving it Excel resolves the problem.

  2. CharlieC

    It looks like the uppercasing in the format is what's tripping the detection up. This is easy enough to fix but I wonder the formats should also be normalised to lower case as Excel seems to do.

  3. Log in to comment