# Calculating Years and Months Between Dates

T

#### Tassy Anne

I'm doing some analysis regarding length of employees service but can't find
any thread relating to a formula that may help do this specifically.

Example

Employee A started working on 01/01/2000 and resigned on 01/02/2009

The start date is in e.g. cell A1 and the resignation date is in e.g. cell A2

Can someone give me a formula that will basically deducted one date from the
other date and tell me how many years and months they worked for us? e.g. the
answer I would like to see is 9 (for the years) and 1 (1 for the month).

If you can, please be very simplistic with your explanation as I don't know
excel very well and tend to stumble around with any formulas I do use.

R

#### Roger Govier

Hi Tassy
Try
=Datedif(A1,A2,"y")&" years "&Datedif(A1,A2,"ym")&" months"

Datedif is an undocumented function in Excel, but more information has been
provided by Chip Pearson
http://www.cpearson.com/Excel/datedif.aspx

J

#### John

Hi Tassy Anne
Try this one, you can remove the day and keep Year&Month only if you like.
=DATEDIF(A1,A2,"y")&" Years, "&DATEDIF(A1,A2,"ym")&" Months and
"&DATEDIF(A1,A2,"md")&" Days"
HTH
John