Please help me fix my Excel formula

Copper Contributor

I am trying to create a formula to calculate the difference between two dates (year, month, and day)

 

The start date is 3/13/02 (E2) and the end date is 5/1/20 (G2). Here is my formula:

 

=DATEDIF(E2,G2,"y")&"years,"
&DATEDIF(E2,G2,"ym")&"months,"
&G2-DATE(YEAR(G2),MONTH(G2),1)&"days"

 

As you can see on the attached screenshot, it is returning 18 years, 1 month, 0 days.

 

According to my calculation, it should be 18 years, 1 month, 19 days including the end date.

 

Please help me figure out what I did incorrectly. I am not a techie, so if you could explain in easy-to-understand terms, I would greatly appreciate it.

 

Thanks!

1 Reply

@Cat09142020  your day calculation is subtracting G2 - …(G2) … (G2). .. or in another words you are getting 0 because you are subtracting it from itself.