How to use DATEDIF Formula in Excel

Welcome to Excel Avon

How to use DATEDIF Formula in Excel

The DATEDIF Function in Excel is categorized under Excel Date or Time Functions  As a financial analyst we may require the number of days, months, or years between two dates. The DATEDIF function helps us calculate the difference. DATEDIF is a hidden function in Excel. As seen below, Excel doesn’t list this function when we type =DATE in a cell. Hence, we need to understand thoroughly the syntax of this function.

Formula

=DATEDIF(START_DATE,END_DATE,UNIT)

Arguments

Start_date – start date in excel date serial number format.

End_date – End date in Excel date serial number format.

UnitThe time unit to use (years, months, or days).

Unit

The DATEDIF function can calculate the time between a Start_date and an End_date in years, months, or days. The time unit is specified with the Unit argument, which is supplied as text.

 

UNIT SCALE

How to use DATEDIF Formula in Excel

Example 4 – Difference in years

To use the DATEDIF function, We have created two dates for example, date of birth and current date, Find the difference year between those dates.

 COMPLETE_YEARDIFFERENCE

so now we will write the formula. =DATEDIF(DATE OF BIRTH, CURRENT DATE,UNIT) Use the unit of Years.

DATEDIF_FUNCTION

After writing the formula, you have to press enter, you will know the difference of years.

DATEDIF_YEAR-FORMULA.png

 Difference in Months

To use the DATEDIF function, We have two dates for example, date of birth and current date, Find the difference months between those dates.

Difference_ of -months

so now we will write the formula.=DATEDIF(DATE OF BIRTH, CURRENT DATE,UNIT) Use the unit of Months.

difference bw months

After writing the formula, you have to press enter, you will know the difference of Months.

result-of-months-.png

 Difference in Days

Same formula will be used to find the days but the unit used to find the days.

difference-b/w two date

Now I will apply the formula.

=DATEDIF(START_DATE,END_DATE,UNIT)

date_formula

Now I will press enter. After entering we will know the difference of days between two dates.

result of days-in

Ignore Month and Returns Days

Same formula will be used to find the days but the unit used to find the Ignore Month and Returns Days. For the unit you can see in the above table.

Ignore month and return date

Now I will apply the formula. Ignore Month and Returns Days will ignore the month and give the result of the remaining days after the month.

Ignore Month and Returns Days

After writing the formula, you have to press enter, you will know the result of the remaining days after the month.

ignore-month return day

How to use DATEDIF Formula in Excel

Ignore Years and Returns Months

Same formula will be used to find the months but the unit used to find the Ignore years and Returns months. After the year, the remaining months will be given in the result.

Ignore-Years-and-Returns-Months..png

Now I will apply the formula. Ignore Years and Returns Months will ignore the Years and give the result of the remaining month after the Years.

Ignore-Years-and-Returns-Months.png

After writing the formula, you have to press enter, you will know the result of the remaining month after the Years.

Ignore-Years-and-Returns-Months.-1.png

Ignore Year and Returns Days

Same formula will be used to find the days but the unit used to find the Ignore years and Returns days. After the year, the remaining days will be given in the result. Now I will apply the formula.

Ignore-years-after-the-days..png

After writing the formula, you have to press enter, you will know the result of the remaining Days after the Years.

ignore-day-after-the-Years.png

You can also check my well explained video about DATEDIF formula

Leave a Reply