> ## 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: DateDiffDays

> Calculate the number of whole days between two datetime values. Use DATEDIFFDAYS for date-range calculations in Integrate.io ETL data pipelines.

## Description

Returns the number of days between the end\_datetime and the start\_datetime.

## Syntax

`DateDiffDays(end_datetime, start_datetime)`

## Arguments

*end\_datetime* - string expression in ISO 8601 format.

*start\_datetime* - string expression in ISO 8601 format.

## Examples

`DateDiffDays('2009-01-07T01:07:01.000Z','2008-02-01T00:00:00.000Z')` returns 341

## Notes

end\_datetime and start\_datetime must be in ISO 8601 date time format, otherwise the job will fail. See [Using ISO 8601 date/time functions](/etl/using-iso-8601-string-functions/).

## Return value datatype

Long

## Impact of null value

If any (or all) inputs are null, returns null.
