elapsed time


Posted by Dave Fraser on April 22, 2000 11:25 PM

I'd like to know how to show elapsed time
in years, months and days if I put a date
in each of two columns. What I get right
now is always off by a month since the formatting
of the third column does not allow for zero months.

Posted by Jaime on April 24, 2000 2:11 PM

=YEAR(C5-B5)-1900&" Years, "&(MONTH(C5-B5)-1)&" Months, "&DAY(C5-B5)&" Days"

Posted by Jaime on April 24, 2000 2:17 PM

=YEAR(C5-B5+1)-1900&" Years, "&(MONTH(C5)-MONTH(B5))&" Months, "&DAY(C5)-DAY(B5)&" Days"



Posted by JAF on April 27, 2000 3:09 AM

You can also use:

=DATEDIF(start_date,end_date,"y") & " years, " & DATEDIF(start_date,end_date,"ym") & " months, " & DATEDIF(start_date,end_date,"md") & " days"

NB - in order for this to work correctly, you MUST remember to include the spaces between the & signs and the preceeding/following text.