Reference Guide > TDV Support for SQL Functions > TDV-Supported Date Functions > DAYS_BETWEEN
 
DAYS_BETWEEN
The DAYS_BETWEEN function returns the number of days between two dates, excluding the two dates themselves. If the later date is first, the result is a positive number. If the earlier date is first, the result is a negative number.
The result is a NUMERIC data type.
Syntax
DAYS_BETWEEN (end-date, start-date)
Example
DAYS_BETWEEN ('1995-01-01', '1995-01-10')
 
This example returns a result of -9, because date1 is earlier than date2.