View Single Post
  #8   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 1 Jul 2005 13:36:16 -0700, "kasey"
wrote:

please help me in something
i have two cells:
31/10/2004 18:00
01/09/2004 07:00
i want to subtract the two cells
the result i am taking is 29/02/1900 11:00
but the correct result is 29 and one month
what can i do
thanks


This is a common problem given that months (and years) have a variable number
of days. So you have to decide how you want to represent certain values.

For example, given dates:

31 Jan 2005
1 Mar 2005

The Datedif function previously recommended will give an answer of
1 month -2 days

I would think 1 month 1 day makes more sense.

But, what about

28 Jan 2005
1 Mar 2005

Do you want an answer of
1 month 1 day
or
1 month 4 days

The latter would be correct if you were counting full calendar months (February
in this case) plus the days that were outside of full calendar months (28-31
Jan + 1 March). But could give answers, under certain circumstances, of more
than 31 days.


--ron