Returns the total number of months between two given dates.
- date1 - the date from which counting begins.
- date2 - the date at which counting ceases.
- Return type:
diffMonths('2021-10-11', '2021-11-11') returns 1.
The function will count the number of months beginning with date1, and ending with date2.
Unsupported data types
Unsupported data types return Null.