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