Excel Hint: How to Use Microsoft Excel 2019 To Calculate the Difference Between Two Dates: Datedif Function
- 0 Comments
Excel Hint: How to Use Microsoft Excel 2019 To Calculate the Difference Between Two Dates: Datedif Function
The Microsoft Website has a really good post on how to use Microsoft Excel to calculate the difference between two dates. The graphic below comes from that page on their website. (The full image is at the end of this post).
How to calculate years between two dates in Excel: If you follow the examples you will see where we calculate the number of years, months,days, hours, minute, seconds, then you can easily derive a formula to calculate years in Excel, as shown below.
The following examples can help you check if you got the formula right – Example 1.
Calculating complete years between two dates (DATEDIF function)
style=”max-width: 100%; height: auto;”
To find out the number of complete calendar years between two dates, use the old good DATEDIF with the “Y” unit:
=DATEDIF(A2,B2,”y”)
Here is the full image of the graphic on the Microsoft Website. Follow the link to go to that page.
If you would like to learn more about this Excel function or literally anything at all in Microsoft Excel, Access, Office and Power BI, visit our free Microsoft Excel Help Forum, VBAExpress.com.