kolmapäev, mai 04, 2005

Wrong date calculations in Excel

In users list someone has asked, why =day(83:20:10) results 2 in OpenOffice.org but 3 in MS Excel.
"The reason is that, Excle calculates wrong: Excel converts the input to 1900-01-03T11:20:10, any value below 1.0 (==24h) results in 1900-01-00, using their serial date value schema a value less than 1.0 should be 1899-12-31; OpenOffice.org uses that as 0-date, because in Excel 1900 erroneously is a leap year, so dates before 1900-03-01 are off with one day.
Dates in Excel are quite limited, you can't even calculate days before 1900-01-00, also negative time values aren't possible, neither as input nor as a calculation elapsed time result."
(by Eike Rathke, OO.o Calc core developer)