justify_hours()

A function converting 24 hour intervals into days

justify_hours() is a system function adjusting an interval so 24-hour time periods are represented as days.

justify_hours() was added in PostgreSQL 8.1.

Usage

justify_hours ( interval ) → interval

Change history

Examples

Basic usage example for justify_hours():

postgres=# SELECT justify_hours('28 hours');
 justify_hours  
----------------
 1 day 04:00:00
(1 row)

Categories

Date and time, System function

See also

justify_days(), justify_interval()