Duration format in google speadsheet -



Duration format in google speadsheet -

i'm trying apply duration format cells in google speadsheet. convert integer number in format: x days x hours x minutes.

i've tried formats like: d:h:mm found problem when apply format. set 1 day less. when write 1 in cell convert 31:0:00. when write 2 cells changes 1:00:00.

does know how solve this?

that because duration format date / time format (for comparing dates). if come in number (1) google interpret midnight (as times stored fractions of whole days) of reference day number 1. reference day in google sheets 31/12/1899 - ie 31st day of month. why result returns days=31.

to accomplish want want add together 1 values. 1 (+1) becomes "2 days since 31/12/1899 - ie 01/01/1900 - ie 1 day, , utilize custom format display, wont work when have >31 days.

i think best way concatenate info have relavent parts (where a1 cell containg info - 1,2,1.5 etc):

=int(a1)&" days "&int(mod(a1,1)*24)&" hours " & mod(mod(a1,1)*24,1)*60 & " minutes"

format google-spreadsheet duration

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -