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

> Calculate the number of whole hours between two datetime values. Use DATEDIFFHOURS for time-range analysis in Integrate.io ETL data pipelines.

## Description

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

## Syntax

`DateDiffHours(end_datetime, start_datetime)`

## Arguments

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

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

## Examples

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

## 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.
