Format a time span as a number of days, hours and minutes
Warning: the above only works for ranges less than 31 days. use
=CONCATENATE(TEXT(FLOOR(B1-A1,1),"@")," Days",TEXT(B1-A1," h:mm:ss"))
instead for ranges above 31 days. This will not sort well, so it would be better to do the calculation in one column and then prettify that column for the end result.
You can use TEXT
=TEXT(B1-A1,"d:h:mm")
Note the same effect can be achieved using a simple number format on the cells directly
- select your range (cells
C1, C2
etc) - right click and Format Cells
- Custom
- Type
d:hh:mm
If unlike your example data, your date differences exceed 31 days, then an approach such as
=INT(B1-A1)&":"&TEXT(B1-A1,"h:mm")
will work