#1   Report Post  
Posted to microsoft.public.excel.misc
lsmft
 
Posts: n/a
Default Dates


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: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=538058

  #2   Report Post  
Posted to microsoft.public.excel.misc
MattShoreson
 
Posts: n/a
Default Dates


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

If you format you cell to numbers you should get 430


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=538058

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Dates

In A1, put 38093
In A2, put 38523
In A3, put =DATEDIF(A1,A2,"y") & " years, " & DATEDIF(A1,A2,"ym") & "
months, " & DATEDIF(A1,A2,"md") & " days"

In order to see:

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

--
Gary''s Student


"lsmft" wrote:


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: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=538058


  #4   Report Post  
Posted to microsoft.public.excel.misc
MattShoreson
 
Posts: n/a
Default Dates


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: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=538058

  #5   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Dates

XL 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 ,
lsmft wrote:

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?



  #6   Report Post  
Posted to microsoft.public.excel.misc
lsmft
 
Posts: n/a
Default Dates


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

Gary"s Student, you formula did exactly what I needed. Thanks to all of
you for your help.


--
lsmft
------------------------------------------------------------------------
lsmft's Profile: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=538058

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula to add dates. S S Excel Worksheet Functions 8 April 5th 06 07:53 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
2 digit year in dates return 19xx not 20xx moranbo Excel Discussion (Misc queries) 1 September 7th 05 01:44 AM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM


All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"