close

I have two dates: 04/16/04, and 06/20/05.
I want to get the difference of time between the two in mm/dd/yy.
I subtracted 04/16/04 from 06/20/05 and got the answer of 03/05/01,
which would mean 3 months, 5 days, 1 year.
Shouldn't it be correctly stated as 2 months, 4 days, 1 year?
What have I done wrong?--
lsmft
------------------------------------------------------------------------
lsmft's Profile: www.excelforum.com/member.php...oamp;userid=30678
View this thread: www.excelforum.com/showthread...hreadid=538058
03/05/01 is actually 03/05/1901.

If you format you cell to numbers you should get 430--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: www.excelforum.com/member.php...foamp;userid=3472
View this thread: www.excelforum.com/showthread...hreadid=538058In A1, put 38093
In A2, put 38523
In A3, put =DATEDIF(A1,A2,quot;yquot;) amp; quot; years, quot; amp; DATEDIF(A1,A2,quot;ymquot;) amp; quot;
months, quot; amp; DATEDIF(A1,A2,quot;mdquot;) amp; quot; daysquot;

In order to see:

4/16/2004
6/20/2005
1 years, 2 months, 4 days

--
Gary''s Studentquot;lsmftquot; wrote:

gt;
gt; I have two dates: 04/16/04, and 06/20/05.
gt; I want to get the difference of time between the two in mm/dd/yy.
gt; I subtracted 04/16/04 from 06/20/05 and got the answer of 03/05/01,
gt; which would mean 3 months, 5 days, 1 year.
gt; Shouldn't it be correctly stated as 2 months, 4 days, 1 year?
gt; What have I done wrong?
gt;
gt;
gt; --
gt; lsmft
gt; ------------------------------------------------------------------------
gt; lsmft's Profile: www.excelforum.com/member.php...oamp;userid=30678
gt; View this thread: www.excelforum.com/showthread...hreadid=538058
gt;
gt;


03/05/01 is actually 03/05/1901.

To work out how many e.g. days you'll have to use
=DAY(cellref)-day(cellref2)Not sure why you would want to do though as 2days, 4 months and a year
wont equate to 430 days, (the difference between the two).--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: www.excelforum.com/member.php...foamp;userid=3472
View this thread: www.excelforum.com/showthread...hreadid=538058XL stores dates as integer offsets from a base date. When you subtract a
date from another date, you get the number of days as a result, but XL
is stupid enough to think that the result should be formatted as a date.
If you format the result as general, you'll get the number of days.
In article gt;,
lsmft gt; wrote:

gt; I have two dates: 04/16/04, and 06/20/05.
gt; I want to get the difference of time between the two in mm/dd/yy.
gt; I subtracted 04/16/04 from 06/20/05 and got the answer of 03/05/01,
gt; which would mean 3 months, 5 days, 1 year.
gt; Shouldn't it be correctly stated as 2 months, 4 days, 1 year?
gt; What have I done wrong?


Mattshoreson,
The dates were April 16, 2004 and June 20, 2005, hence the 2 months/4
days/ 1 year.
Thanks for your help.

Garyquot;s Student, you formula did exactly what I needed. Thanks to all of
you for your help.--
lsmft
------------------------------------------------------------------------
lsmft's Profile: www.excelforum.com/member.php...oamp;userid=30678
View this thread: www.excelforum.com/showthread...hreadid=538058

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()