The result from DATEDIF is a number that corresponds to the time unit requested.

The status of DATEDIF in Excel is somewhat mysterious.

The desired interval is specified with theunitargument, which is supplied as text.

DATEDIF difference in days

The table below shows the available unit values and the results for each.

Time units can be provided in upper or lower case (i.e.

“ym” is equivalent to “YM”).

DATEDIF difference in days

This means DATEDIF will round months down even when it is very close to the next whole month.

For a detailed explanation of calculating months between dates with several alternative formulas,see this example.

Because DATEDIF only calculates complete years, the result is still 5.

DATEDIF difference in days

In row 7 we use theYEARFRAC functionto calculate a more accurate result.

Download the workbook and read a complete explanationon this page.

you might find a full explanation and download the workbookon this page.

DATEDIF difference in days

NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and canoptionallyexclude a list of holidays supplied as dates.

For example, the formula =DAYS360(“1-Jan-2021”,“31-Dec-2021”) returns 360 days.

DATEDIF difference in days

DATEDIF difference in months

DATEDIF difference in years

DATEDIF get age from birthday

DATEDIF get days months and years between dates

Excel formula: Next anniversary date

Excel formula: Get days, months, and years between dates

Excel formula: Get age from birthday

Excel formula: Calculate time before expiration date

Excel formula: Get days between dates ignoring years

Excel formula: Repeat fixed value every 3 months

Excel formula: Get months between dates

Article image

Article image

Excel NETWORKDAYS function

Excel YEARFRAC function

Excel DAYS360 function

DATEDIF get days months and years between dates