Google-sheets – In Google sheets, how to calculate elapsed duration between two cells, each containing date and time and display as days and hours

google sheetsgoogle-sheets-dates

There is a built-in duration format, but Elapsed days is not an option. I want to display "2 days, 3 hours"

enter image description here

Best Answer

Try the following:

=split(days(B2,A2) & " Day," & Timevalue(B2) - timevalue(A2),",")

Days allows you to work out the difference between two days, timevalue gives you the duration between two times as you have to extract it from your cells. I would then use split to put the duration a separate column as formats can only be applied to a single cell as far as I'm aware

you could also just use =Days and subtract the end date from the start to get the hours, but it won't prase it into days.