Returns the number of date and time boundaries crossed between two specified dates.
For example, you could use this function to find the number of days in a certain interval of dates.
NOTE: This function is equivalent to DATEDIFF in T-SQL.
Integer
DATEDIFF( datePart, startDate, endDate )
where:
The startDate value is subtracted from the endDate.
NOTE: If the startDate is later than the endDate, then the return value is a negative number. If the result is out of range for integer values, the system returns an error.