Parameter List
Syntax
DATEDIF(start_date, end_date, unit)
start_date
The start date to consider in the calculation. For example: 2022-02-16.
end_date
The end date to consider in the calculation. For example, 2026-08-27.
unit
The start of the date range. Accepted values are:
- 'Y' which returns the difference in years
- 'M' which returns the difference in months
- 'D' which returns the difference in days
- 'MD' which returns the difference in days excluding months
- 'YM' which returns the difference in months excluding years and
- 'YD' which returns the difference in days excluding years.