In Excel, date are stored as an integer value, which is the number of days since Jan 1, 1900. For example, '1/1/1970' is stored as 25569.
Question #1: Unlike Javascript datetime, which references a UTC time (i.e., UNIX epoch time), Excel date definition doesn't mention the timezone of "Jan 1, 1900". Is the reference time 'Jan 1, 1900' not specific to any time zone?
Question #2: I used multiple methods to calculate the days elapsed between 'Jan 1, 1970' and 'Jan 1, 1900', the result is 25567. However, in Excel 'Jan 1, 1970' is stored as 25569 (2 more days than what it should be'. Did I miss something?
1: Excel's date/time is in terms of the local time on the computer. It does NOT use the timezone information. To obtain timezone information in Excel requires Windows API calls.
2: Count starts at one (1-Jan-1900 = 1
)
Excel include the non-existent 29-Feb-1900. See: Excel incorrectly assumes that the year 1900 is a leap year
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With