View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default How do I get total hours from 2 date/time cells?

When you ask Excel to display months, it displays the month of the year, not the
number of months.

Your formula gives the answer of 2 days, 7 hours and 15 minutes. For this
answer, Excel stores the date/time of 1900 Jan 2 07:15. When you ask it to
display the month, it dutifully displays month number 1 (January).

You can't display the number of months with a date/time format. In your case,
why bother, as the number is zero. If you are simply looking for the total hours
and minutes, use the format [hh]:mm which will display hours over 24.

--
Regards,
Fred


"Rick Taylor" wrote in message
...
I am trying to get the total time that it took from the date and time
something was inducted until the date and time it was completed. I have seen
a few suggestions that come close, but not exactly correct.

I.E. cell A1 = 01/30/2006 23:45
cell B1 = 02/02/2006 07:00

cell C1 input the formula =B1-A1 and change the format to M:DD:HH:MM

But this usually comes back with a figure like 1:02:07:15, which to me is
wrong as it is stating 1 month, 2 days, 7 hours and 15 minutes. Everything
is okay except for the month, which should be zero, as it really only took 2
days, 7 hours and 15 minutes.

If I do the same but change the second data to 05/22/2006 07:00 then I get a
figure of 4:20:07:15. This again appears wrong to me. It should only be 3
months (FEB, MAR, APR), 21 days, 7 hours 15 minutes.

Any advice is welcomed.