justify-hours.md 1.0 KB


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.

Signatures

{{< diagram "func-justify-hours.svg" >}}

Parameter Type Description
interval interval The interval value to justify.

Return value

justify_hours returns an interval value.

Example

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