Excel Serial Date & OADate Converter
Convert an Excel serial date or OLE Automation Date (OADate) to a Unix timestamp, ISO 8601, and a readable date. Explains the 1900 date system and the famous Excel 1900 leap-year bug.
What is an Excel serial date?
Excel stores dates as serial numbers: the integer part is the number of days since the system epoch and the fractional part is the time of day. In the default 1900 date system, serial 1 is January 1, 1900. The OLE Automation Date (OADate) used by .NET and COM uses the same day count but counts from December 30, 1899.
- Day 0 (OADate) = 1899-12-30; Excel serial 1 = 1900-01-01
- Integer part = days, fractional part = fraction of a 24-hour day
- Example: 45244.92592593 → 2023-11-14 22:13:20
- OADate is produced by DateTime.ToOADate() in .NET
How to convert an Excel date to Unix time
There are 25,569 days between the Excel/OADate origin (1899-12-30) and the Unix epoch (1970-01-01). Subtract that and multiply by the number of seconds in a day.
- Unix seconds = (ExcelSerial − 25569) × 86400
- Unix milliseconds = (ExcelSerial − 25569) × 86400000
- Reverse: ExcelSerial = Unix seconds / 86400 + 25569
- This converter treats the input as a UTC wall-clock value
The 1900 leap-year bug
For backward compatibility with Lotus 1-2-3, Excel incorrectly treats 1900 as a leap year and includes a non-existent February 29, 1900 (serial 60). For any date on or after March 1, 1900 the standard 25,569 offset is correct; only serials of 60 or below are affected. Most real-world data falls well after this, so the bug rarely matters in practice — but it is why the offset is 25,569 and not 25,568.
- Serial 60 = the phantom 1900-02-29; serial 61 = 1900-03-01
- Dates before 1900-03-01 are off by one day in the 1900 system
- The 1904 date system (legacy Mac Excel) counts from 1904-01-01 instead
- How do I convert an Excel serial date to a Unix timestamp?
- Subtract 25,569 (the days between 1899-12-30 and 1970-01-01) and multiply by 86,400 to get Unix seconds.
- What is an OADate?
- An OLE Automation Date is a floating-point day count from December 30, 1899, used by .NET (DateTime.ToOADate) and COM. It matches Excel serial dates for all modern dates.
- Why is the Excel offset 25569 and not 25568?
- Excel’s 1900 leap-year bug inserts a fake February 29, 1900, adding one day to the count for any date after that, which makes 25,569 the correct offset for modern dates.