The cell I have in Google Sheets currently shows the difference in time between two date-times, the cell is formatted as a duration and displays as a colon separated value in hours, minutes and seconds.
Example below.
788:42:07
How do I format the cell to be more human readable, specifically in the format that shows the days, hours and minutes of the duration with each numeric value labelled appropriately?
The solution I found to be effective was writing a formula the converted the existing duration value into the individual duration component values of days, hours and minutes and then concatenates these values with strings that label the values appropriately.
The formula is as follows:
=int(B4)&" days "&hour(mod(B4,1))&" hours "&minute(mod(B4,1))&" minutes"
with B4 being the duration formatted cell containing the value
788:42:07
The cell containing the solution formula now displays the duration cell information as follows:
32 days 20 hours 42 minutes
I found the following resources useful in discovering the solution to this question.
Google Sheets INT formula documentation
Google Sheets MOD formula documentation
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.