For the complete documentation index, see llms.txt. This page is also available as Markdown.

DateDiff

The DateDiff() function calculates the difference between two dates. You can use the DateDiff for the difference in: year, month, week, day, hour, minute or second.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Syntax

DateDiff(start_date, end_date, unit)

DateDiff('2014-08-21', '2002-12-31', Year) =>Result: 11

DateDiff() =>Result: unknown

Parameters

Name
Type
Required
Description

start_date

date time

☑️

the start date

end_date

date time

☑️

the end date

unit

Keyword

☑️

the date unit of which the difference is calculated. Possible values: years, months, weeks, day, hour, minute or second.

Last updated

Was this helpful?