View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Difference between dates and times

hi,

Apologies, I had an elderly monent, try this

=CONCATENATE(TRUNC(TEXT(B1-A1,"[h]")/24)," days, ",HOUR(B1-A1)," hours
",MINUTE(B1-A1)," minutes")

Mike

"jmj713" wrote:

Yes, that is what I meant, but should the number of days be 59?

"Mike H" wrote:

Hi,

When posting date examples it's a good idea to post days greater than 12 so
we know which is the month and which are days.

I think you mean
2 February 2009 08:00

and

2 April 2009 12:10

If you do then i have do difficulty with excels answer of 28 days 4 hrs and
10 minutes, why do you think this is incorrect

Mike

"jmj713" wrote:

I'm having real trouble coming up with a formula to get a difference between
two cells which contain full dates and times.

If I have 2/2/09 8:00 AM in A1 and 4/2/09 12:10 PM in B2, in the third cell
I entered =B1-A1 and formatted the cell as Custom and Type: d "days" hh
"hours" mm "minutes" - but I'm not getting the right number of days. The
output says: 28 days 04 hours 10 minutes, so the hours and minutes is
correct, but not the days. How can I fix this?