GET_DURATION_FROM_SEC
Get an ISO 8601 string representation of the duration provided in seconds.
Usage
GET_DURATION_FROM_SEC(duration)
Parameters
duration |
Number |
A number of seconds representing the desired duration. |
Returns
String
Examples
GET_DURATION_FROM_SEC(5) |
‘PT5S’ |
GET_DURATION_FROM_SEC(62) |
‘PT1M2S’ |
GET_DURATION_FROM_SEC(3610) |
‘PT1H10S’ |
Remarks
This function can be useful when calling aggregating functions such as AVERAGE, MAX, MIN as it converts a simple duration into the ISO 8601 format.