During the period 23/12 to 6/1, we will have slightly longer response times than usual. Merry Christmas and a Happy New Year! 🎄✨

Want to get free access to our Excel functions course?

Fill in your e-mail address and telephone and we will give you 7 days free access to our course The Excel Functions Guide.

Share

In this lesson we will take a look at how to get the number of years, months, or days between two dates by using the DateDif function.
This function has three arguments: The two cells that we are comparing, and the denomination we want to use.
We’ll type Equals, DateDif, and select the two dates between which we want to find the difference. We first want to find the amount of years between them, so we’ll write a “y” within quotation marks.
The letter can be changed into an “m”, for months… or a “d” for days. For weeks, we can wrap the DateDif function for days in brackets, and divide the number we get by seven.
You can type in “yd” to ignore the years and get only the days between the dates. This can also be done for ignoring the years to get the amount of months using “ym” … And ignoring the months to get the amount of days using “md”.
The DateDif function is a hidden function, meaning that it does not show up as a suggestion in neither the tooltip… nor the insert function button.
In this lessen we have gone through the DATEDIF function.