Description
Converts a datetime value to an Excel serial date number (1900 date system). The integer part is the number of days since 1899-12-30; the fractional part is the time of day.
This is the inverse of ExcelSerialToDate. Use it when writing data to a destination — typically a spreadsheet — that stores dates as numeric serial values.
Syntax
DateToExcelSerial(datetime_value)
Arguments
- datetime_value - datetime expression to convert.
Examples
DateToExcelSerial(ToDate('2020-01-01T00:00:00Z')) returns 43831.0
DateToExcelSerial(ToDate('2020-01-01T12:00:00Z')) returns 43831.5
Return value datatype
double
Impact of null value
If datetime_value is null, returns null.
Last modified on October 5, 2026