Back to Materialize

justify_hours function

doc/user/content/sql/functions/justify-hours.md

123955 B
Original Source

justify_hours returns a new interval such that 24-hour time periods are converted to days.

Signatures

{{% include-syntax file="examples/sql_functions/justify_hours" example="syntax" %}}

ParameterTypeDescription
intervalintervalThe interval value to justify.

Return value

justify_hours returns an interval value.

Example

mzsql
SELECT justify_hours(interval '27 hours');
nofmt
 justify_hours
----------------
 1 day 03:00:00