Number of Months and Days between 2 dates?

G

Guest

Hi is it possible to calculate the number of months and the remaining days
between 2 dates, i.e

Date 1 is 1/16/07
Date 2 is 6/10/07

So if I use the DatedIF(Date 1, Date 2,"M") i would have the # of months;
how would i have the days remaining, meaning i have 4 months, and 24 days,

help please !
 
G

Gord Dibben

Jean

Date 1 in A6................Date 2 in A7

=DATEDIF(A6,A7,"y") & "years," & DATEDIF(A6,A7,"ym") & "months,"&
DATEDIF(A6,A7,"md") & "days,"


Gord Dibben MS Excel MVP
 
G

Guest

thx a lot! that really helps!! thank you!

Gord Dibben said:
Jean

Date 1 in A6................Date 2 in A7

=DATEDIF(A6,A7,"y") & "years," & DATEDIF(A6,A7,"ym") & "months,"&
DATEDIF(A6,A7,"md") & "days,"


Gord Dibben MS Excel MVP
 
J

JE McGimpsey

Note that using "md" bases days in a month on the number of days in the
month of the first argument, so you can get some weird results, like:

A6: 1/31/2007
A7: 3/01/2007

results in

0years,1months,-2days,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top