DATEDIFF
Compares two dates or timestamps and returns the difference in days.
Syntax
DATEDIFF(endDate string, startDate string) → integer
endDate: A
DATE
orTIMESTAMP
expression.startDate: A
DATE
orTIMESTAMP
expression.
Examples
DATEDIFF example
DATEDIFF example
Usage Notes
If endDate
is before startDate
the result is negative.
Last updated