MONTHS_SUB (Lakehouse v2)
Subtracts a specified number of months from a date.
Analyze Syntax
Section titled “Analyze Syntax”func.months_sub(<date>, <n>)Analyze Examples
Section titled “Analyze Examples”func.months_sub('2024-06-15', 3)
┌──────────────┐│ '2024-03-15' │└──────────────┘SQL Syntax
Section titled “SQL Syntax”MONTHS_SUB(<date>, <n>)SQL Examples
Section titled “SQL Examples”SELECT MONTHS_SUB('2024-06-15', 3);
┌────────────┐│ 2024-03-15 │└────────────┘