> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: DateToExcelSerial

> Convert a datetime value to an Excel serial date number (1900 date system). Use when writing data to spreadsheets that expect numeric date serials.

## 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](/docs/etl/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.

## Related functions

* [ExcelSerialToDate](/docs/etl/excelserialtodate) — the inverse conversion.
* [ToDate](/docs/etl/todate) — parse datetime values from strings or Unix milliseconds.
