Subtract two dates

J

Joe

I wud lik to know whtr thr is ne formula for date subtraction, ie., if i gv d
formula for sutracting 2dates, i nd to gt the d/f in mm/dd/yyyy format. i
doubt leap yrs and 30/31 days may pose an issue
 
G

Gary''s Student

If the older date is in A1 and the recent date is in B1, then:

=DATEDIF(A1,B1,"y") & " years, " & DATEDIF(A1,B1,"ym") & " months, " &
DATEDIF(A1,B1,"md") & " days"
 
J

Joe

The formula is effective, i tried. But d thing is i didnt understand d logic.
Can u pls xpln how d func works n d appln of y, ym n md in 1st, 2nd n 3rd
parenthesis resp.
 
Top