YEARS_DIFF
Returns the number of years between two dates.
Analyze Syntax
func.years_diff(<end_date>, <start_date>)
Analyze Examples
func.years_diff('2029-01-01', '2024-01-01')
┌───┐
│ 5 │
└───┘
SQL Syntax
YEARS_DIFF(<end_date>, <start_date>)
SQL Examples
SELECT YEARS_DIFF('2029-01-01', '2024-01-01');
┌───┐
│ 5 │
└───┘