Difference between dates/times in Days & Hours

S

Steve Vincent

Hi,

I need to calculate the difference between two dates/times. The date/time
is entered in this format:

12/12/07 3:52 PM

When I simply subtract the end date from the start date, it gives me a
number in days with two-digit decimal place for partial day (e.g., 5.01). Is
there a way to format the cell or add to my simple formula (=B2-A2) to
convert the number into days/hours/minutes of some kind? I've been
experimenting without much luck, and didn't see a posting that was specific
to this issue.

Thank you in advance,
Steve
 
C

Conan Kelly

Steve,

How about this:

=DAY(B2-A2) & " Days " & HOUR(B2-A2) & " Hours " & MINUTE(B2-A2) & " Minutes
" & SECOND(B2-A2) & " Seconds"

Will that work for you?

HTH,

Conan
 

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