EXCEL Date difference calculation

Tip / Finance and Investing

EXCEL Date difference calculation
Asoka Walpitagama , Manager, Sri Lanka

Calculating Years, months & days between 2 dates in EXCEL.

If you need to calculate the No of years months & days between 2 dates in Excel use the following function ( This function is not listed in Excel help )

=DATEDIF( date 1, date 2, format )

- date1 should be before date 2
- format should be within double quotes " & given as follows
- "y" to get the year difference
- "ym" to get the month difference
- "md" to get the days difference

For example:
- type in cell A2 12-Jan-85 & cell B2 15-Mar-12
- type the formulas to get the Years,Months & Days as follows
- cell D2 =DATEDIF(A2,B2,"y")
- cell E2 =DATEDIF(A2,B2,"ym")
- cell F2 =DATEDIF(A2,B2,"md")
The functions & the parameters are same except the format which will decide the years, months & days
If you use "m" & "d" as formats you will get the months & days difference without eliminating the years & months
Try that also in cells H2 & I2 ,sometimes you may require that also.

React  |  More on the Author  |  More on this Interest Area

About 12manage | Advertising | Link to us | Privacy | Terms of Service
Copyright 2016 12manage - The Executive Fast Track. V14.1 - Last updated: 26-10-2016. All names tm by their owners.