calculate the the diffrence between 2 Dates and time

L

LKWP

I am trying to create a formula that calculates the diffrence beween the date
and the time. I.e result would be 3d 10m ot 3d 10m30s. Can anyone help??
 
B

Bob Phillips

How about

=INT(A7-A6)&"d "&TEXT(MOD((A7-A6),1),"h:mm:ss")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pete_UK

Are your date/time values combined in one cell, or separate cells for
date and for time?

Essentially, you just need to subtract the smaller (earlier) date/time
from the larger (later) date/time, and then apply a custom format to
the result as you require it, but you will need to account for hours
as well as minutes and seconds.

Hope this helps.

Pete
 

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