#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default Date Subtraction

I am trying to take a later date and subtract from it an earlier date to
determine the time in between. (07/11/06)-(04/14/05)=(03/28/01)
1Y 3M 28D is not correct. What am I missing?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Subtraction

See this:

http://www.cpearson.com/Excel/datedif.aspx

--
Biff
Microsoft Excel MVP


"Newbie" wrote in message
...
I am trying to take a later date and subtract from it an earlier date to
determine the time in between. (07/11/06)-(04/14/05)=(03/28/01)
1Y 3M 28D is not correct. What am I missing?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Date Subtraction

You're assuming that 3/28/01 means 1Y 3M 28D...

XL stores dates as integer offsets from a base date (12/31/1899 in
Windows default 1900 date system, 1/1/1904 in the Mac default 1904 date
system), with 1 = 1 day.

Format your result cell as General and you'll see that the result is 453
days. Format it as a date, though, and XL incorrectly determines that
453 days after 12/31/1899 is 3/28/1901.

If you want years, months, and days, you can use DATEDIF:

http://cpearson.com/excel/datedif.aspx

Be aware, however, that months are impossible to generally and
consistently define algorithmically.

In article ,
Newbie wrote:

I am trying to take a later date and subtract from it an earlier date to
determine the time in between. (07/11/06)-(04/14/05)=(03/28/01)
1Y 3M 28D is not correct. What am I missing?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default Date Subtraction

Can you combine "y" "m" "d" in the formula to get 2 yrs 3 months and 5 days?

"T. Valko" wrote:

See this:

http://www.cpearson.com/Excel/datedif.aspx

--
Biff
Microsoft Excel MVP


"Newbie" wrote in message
...
I am trying to take a later date and subtract from it an earlier date to
determine the time in between. (07/11/06)-(04/14/05)=(03/28/01)
1Y 3M 28D is not correct. What am I missing?




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
date subtraction [email protected] Excel Worksheet Functions 6 December 9th 08 02:13 PM
Different results: Networkdays versus date subtraction OxonLad Excel Worksheet Functions 6 June 18th 08 03:38 PM
Subtraction Rookie Excel Worksheet Functions 14 February 24th 08 11:42 AM
date and time in 2 cells to create subtraction in 3rd MikeR-Oz New Users to Excel 2 October 27th 07 10:35 AM
Date subtraction -How to not show negative when 2nd date not entered Edward[_2_] New Users to Excel 2 September 27th 07 03:03 PM


All times are GMT +1. The time now is 12:55 AM.

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"