Convert time duration to HH:MM:SS

Sharing a calculated field you can use to convert a numeric field (measured in seconds) into HH:MM:SS format (will become a string). You cannot do any math or date calculations while in this form as the result is a string, but it will work for display purposes (and will sort correctly if you place on an X-axis, table, etc).

concat(

ifelse({Average Talk Time} / 3600 < 10,concat('0',tostring(floor({Average Talk Time} / 3600))),tostring(floor({Average Talk Time} / 3600)))

,':',

ifelse(({Average Talk Time} % 3600)/60 < 10,concat('0',tostring(floor(({Average Talk Time} % 3600)/60))),tostring(floor(({Average Talk Time} % 3600)/60)))

,':',

ifelse({Average Talk Time} % 60 < 10,concat('0',tostring(floor({Average Talk Time} % 60))),tostring(floor({Average Talk Time} % 60)))

)
4 Likes