DATEDIFF
Difference between two dates in the specified unit.
Category: Date & Time Functions
Syntax
DATEDIFF(part, date, end)
Arguments
- part
varchar[constant] Unit to measure the difference in, such asday,month, oryear. Must be a constant expression. - date
temporalDate, time, or timestamp value to evaluate. - end
temporalEnding date, time, or timestamp value.
Returns
integer — Returns the computed result as integer.