Summary

To calculate days between two dates, ignoring year values, use the DATEDIF function. In the example shown, the formula in D6 is:

=DATEDIF(B6,C6,"yd")

Generic formula

=DATEDIF(start_date,end_date,"yd")

Explanation 

The DATEDIF function can handle a variety of "date difference" calculations to calculate the difference between two dates in years, months, and days. DATEDIF takes 3 arguments: start date, end_date, and "unit", which controls which result is returned.

In this case, we want days ignoring years so we supply "yd" for unit. (For the full list of options, see the DATEDIF page).

Once configured, the function is fully automatic and returns a result in the unit requested.

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.