Format a time span as a number of days, hours and minutes

后端 未结 7 958
夕颜
夕颜 2020-12-11 00:50

This is purely an Excel sheet question.

I have a time span that is basically a difference between two cells, each containing a date:

I have managed to get th

7条回答
  •  萌比男神i
    2020-12-11 01:31

    The following approach works as well, assuming that your start date is in cell C2 and your end date is in cell D2:

     =TEXT((D2-C2)-MOD(D2-C2,1),"0") & " days " & TEXT(MOD(D2-C2,1),"hh:mm")
    

提交回复
热议问题