title: "justify_hours function" description: "Adjust interval so 24-hour time periods are represented as days" menu: main:
parent: 'sql-functions'
justify_hours
returns a new interval
such that 24-hour time periods are
converted to days.
{{< diagram "func-justify-hours.svg" >}}
Parameter | Type | Description |
---|---|---|
interval | interval |
The interval value to justify. |
justify_hours
returns an interval
value.
SELECT justify_hours(interval '27 hours');
justify_hours
----------------
1 day 03:00:00