Forum Discussion
Excel for Mac 1900 date system seems to add an extra day ?
When I recently switched between the 1904 and 1900 date systems, I noticed an anomaly. The number of days between the two systems is 1462. The documentation states "1,462 days is equal to four years and one day (including one leap day)."
Say what? Four years plus one day is 1461, not 1462.
This is a problem when passing a 1900 based date to a database query (postgreSQL) as it breaks this little script:
select date '1900-01-01' + integer ? as "Date"
The result from the above is incorrect; it is off by one day.
Using the 1904 date system and changing the script to:
select date '1904-01-01' + integer ? as "Date"
The result from the 1904 based date is CORRECT.
Bug?
Edit: I got around this by converting the date to text, then passing the text to the script. That way it is passed as 2018-10-02 and not 43375.
1 Reply
- SergeiBaklanDiamond Contributor
Hi Craig,
That's know bug in Excel for Windows, see https://support.microsoft.com/en-us/help/214326/excel-incorrectly-assumes-that-the-year-1900-is-a-leap-year.