How to Convert Numbers to Dates

Uploaded a file and your date column turned into a big number? Or every date reads 1970-01-01? Your dates are stored as numbers, and Savant needs to know which kind before it can turn them back into dates.

Which Number Do You Have?

Count the digits:

  • 5 digits (ex: 46,295) – an Excel serial date, counting days since 30 Dec 1899.

  • 10 digits (ex: 1,720,990,732) – Unix epoch seconds, counting seconds since 1 Jan 1970.

  • 13 digits (ex: 1,720,990,732,000) – Unix epoch milliseconds, counting milliseconds since 1 Jan 1970.

Excel Serial Dates (5 Digits)

Excel stores each date as a count of days. Officially it starts at 1 Jan 1900, but it also counts a 29 Feb 1900 that never happened. That makes 30 Dec 1899 the starting point that gets modern dates right.

Use this formula in the Transform tool and replace `SerialDate` with your field name:

DATE_ADD(TO_DATETIME('1899-12-30 00:00:00'), `SerialDate`, 'day')

For example, 46,295 becomes 2026-09-30.

⚠️ Heads up: Don't just change the column type to Date. Savant reads the number as milliseconds, and every value comes back as 1970-01-01.

Unix Epoch Seconds (10 Digits)

Use this formula in the Transform tool and replace `EpochTime` with your field name:

DATE_ADD(TO_DATETIME('1970-01-01 00:00:00'), `EpochTime`, 'second')

For example, 1,720,990,732 becomes 2024-07-14 20:58:52.

Unix Epoch Milliseconds (13 Digits)

No formula needed. Change the field's type to Datetime and Savant converts it for you.

💡 Tip: If your field is stored as text or a decimal, wrap it in TO_INT() before using either formula, ex: TO_INT(`SerialDate`).