YEARS_DIFF
Overview
Returns the number of years between two dates or timestamps. The result equals the first argument minus the second argument.
Syntax
Parameters
<end>: DATE or TIMESTAMP type, used as the minuend.<start>: DATE or TIMESTAMP type, used as the subtrahend.
Returns NULL if either argument is NULL.
Examples
Related Documentation
- DATEDIFF — general-purpose date difference function supporting multiple time units
- MONTHS_DIFF, WEEKS_DIFF, DAYS_DIFF
