YEARS_SUB (Lakehouse v2)
Subtracts a specified number of years from a date.
Analyze Syntax
Section titled “Analyze Syntax”func.years_sub(<date>, <n>)Analyze Examples
Section titled “Analyze Examples”func.years_sub('2029-01-01', 5)
┌──────────────┐│ '2024-01-01' │└──────────────┘SQL Syntax
Section titled “SQL Syntax”YEARS_SUB(<date>, <n>)SQL Examples
Section titled “SQL Examples”SELECT YEARS_SUB('2029-01-01', 5);
┌────────────┐│ 2024-01-01 │└────────────┘