GET_DURATION_FROM_HR
Get an ISO 8601 string representation of the duration provided in hours.
Usage
GET_DURATION_FROM_HR(duration)
Parameters
duration |
Number |
A number of hours representing the desired duration. |
Returns
String
Examples
GET_DURATION_FROM_HR(36) |
‘P1DT12H’ |
GET_DURATION_FROM_HR(16) |
‘PT16H’ |
GET_DURATION_FROM_HR(169) |
‘P7DT1H’ |
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.