Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Calculate difference in dates

On Mon, 11 Aug 2008 23:00:03 -0700, Geo wrote:

I want the difference between the Resigned date and Joining date; if I use
the formula B1-A1, I get the correct answer in the General number format. But
if I use the date format it is showing one month in excess.
Eg:

A B C
28/05/1996 12/08/2008 =16/03/12 (B1-A1)

B1-A1 will give you 4459 as answer in General number format which is
correct, whereas date format will give you 16/03/12 as answer which is one
month excess.

Hope this clarifiaction is quite ok. please help....
--
Geo


If all you want is a particular format, then the formula I supplied earlier,
with dates in C6:D6

=TEXT(DATEDIF(C6,D6,"md"),"00")&"/"&
TEXT(DATEDIF(C6,D6,"ym"),"00")&"/"&
TEXT(DATEDIF(C6,D6,"y"),"00")

already gave you the result in the format you wanted.

You felt that was unsatisfactory, but you haven't responded to any of the
comments that were made to explain why it was unsatisfactory.

You indicated you got some large number when you tried to use it in a formula,
but you did not tell us how you got that number.

Using the above dates, it gives a result of 15/02/12

12 years
2 months
15 days

This is a text string, not a numeric value.

I hope you are aware that you cannot specify any exact time interval that
includes years and months, without further rules. Neither a "year" nor a
"month" are an exact interval. A year can be 365 or 366 days. A "month" can
be 28, 29, 30 or 31 days.

If you are computing something that depends on days in service, use the number
of days in you calculations and not this text string.
--ron
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
How do I calculate exact difference between two dates in y,m,d. Muhammad Javaid Hassan Excel Worksheet Functions 8 September 23rd 06 10:02 PM
How do I calculate exact difference between two dates in y,m,d. Muhammad Javaid Hassan Excel Worksheet Functions 3 September 19th 06 01:42 PM
How do I calculate the difference between 2 dates (m,d,y) ? ady_sandu Excel Worksheet Functions 8 September 29th 05 05:09 PM
Calculate Difference b/e 2 dates. scharee New Users to Excel 2 August 2nd 05 04:28 PM
Calculate difference between two dates Trainer Excel Worksheet Functions 1 February 11th 05 02:04 PM


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

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

About Us

"It's about Microsoft Excel"