Converting dd:hh:mm to [h]:mm not working.

J

Joe H.

I am requesting help finding the number of hours and minutes between two
dates. I do not have to take into account work hours or holidays...just raw
hours and minutes. Below is how I am calculating but I arrive at an error.

Cell A1 = 8/4/09 7:18 PM
Cell B1 = 8/5/09 10:02 PM
Cell C1 = "{=TEXT(B1-A1,"dd:hh:mm")}" which converts to 01:02:44, formatted
as "37:30:55"
Cell D1 = "=CONVERT(C1,"day","hr")" which converts to 25:05, formatted as
[h]:mm


I was expecting 26:44 as it is the raw spand of hours and minutes between
these two dates. Can anyone see what I did wrong ?

Thank you in advance, Joe
 
P

Peo Sjoblom

Why not just

=B1-A1

then use custom formatting [h]:mm

and it will return 26:44

--


Regards,


Peo Sjoblom
 
J

Jacob Skaria

=B1-A1
and format to [h]:mm:ss

OR

=TEXT(B1-A1,"[h]:mm:ss")

If this post helps click Yes
 
J

Joe H.

That works. Thanks. I was working on other calculations and got myself
cornered in complexity. Appreciate your response.
--
Joe H.


Peo Sjoblom said:
Why not just

=B1-A1

then use custom formatting [h]:mm

and it will return 26:44

--


Regards,


Peo Sjoblom


Joe H. said:
I am requesting help finding the number of hours and minutes between two
dates. I do not have to take into account work hours or holidays...just
raw
hours and minutes. Below is how I am calculating but I arrive at an error.

Cell A1 = 8/4/09 7:18 PM
Cell B1 = 8/5/09 10:02 PM
Cell C1 = "{=TEXT(B1-A1,"dd:hh:mm")}" which converts to 01:02:44,
formatted
as "37:30:55"
Cell D1 = "=CONVERT(C1,"day","hr")" which converts to 25:05, formatted as
[h]:mm


I was expecting 26:44 as it is the raw spand of hours and minutes between
these two dates. Can anyone see what I did wrong ?

Thank you in advance, Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top