ReePrime
Why not to use DATEDIF() - Excel Tips and Tricks

Hosted by Dailymotion. For legal issues report at the Copyright Center, report us on DMC, or use the Instant Removal tool.

Why not to use DATEDIF() - Excel Tips and Tricks

E
ExcelTips247

18 Views • Jul 02, 2025

Description

Learn about why not to use DATEDIF() function.

These are the available units in DATEDIFF() function.
"Y" The number of complete years in the period.
"M" The number of complete months in the period.
"D" The number of days in the period.
"MD" The difference between the days in start_date and end_date. The months and years of the dates are ignored.
Important: We don't recommend using the "MD" argument, as there are known limitations with it. See the known issues section below.

"YM" The difference between the months in start_date and end_date. The days and years of the dates are ignored
"YD" The difference between the days of start_date and end_date. The years of the dates are ignored.

* IMPORTANT *
For "MD" Microsoft does not recommend using the "MD" argument, as there are known limitations with it. See the known issues section below.


These are the formulas used on the video.
Number of complete years in the period
=DATEDIF($A$2,$B$2,A5)
OR
=DATEDIF($A$2,$B$2,"Y")

Number of complete months in the period
=DATEDIF($A$2,$B$2,A6)
OR
=DATEDIF($A$2,$B$2,"M")

Number of days in the period.
=DATEDIF($A$2,$B$2,A7)
OR
=DATEDIF($A$2,$B$2,"D")

Difference between the days in start & end date.
Months & years of the dates are ignored.
=DATEDIF($A$2,$B$2,A8)
OR
=DATEDIF($A$2,$B$2,"MD")

Difference between the months in start & end date.
Days & years of the dates are ignored.
=DATEDIF($A$2,$B$2,A9)
OR
=DATEDIF($A$2,$B$2,"YM")

Difference between the days of start & end date.
Years of the dates are ignored.
=DATEDIF($A$2,$B$2,A10)
OR
=DATEDIF($A$2,$B$2,"YD")



DATEDIF function (Microsoft 365 support)
https://support.microsoft.com/en-us/office/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c


excel datedif missing,excel datedif not working,excel datedif today,datedif formula,how to use datedif in excel,
excel datedif minutes,excel datedif alternative,