One thing I find myself needing to do on a relatively regular basis, is calculate the number of days, months, or years between two given dates. Like with so many other things, Excel has a function for this, too. It’s intuitively named
DATEDIF, and here’s how you use it.
The syntax is
=DATEDIF(startdate,enddate,UNIT). The units are D for days, M for complete months, and Y for complete years, and here’s how it looks in use:
In addition to those three unit variants, you can also calculate the months or days between the dates, ignoring the years and dates or months as the case might be, using the units “YM” to count months, and “YD” to count days. Here’s how that looks: