PostgreSQL JUSTIFY HOURS Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL JUSTIFY_HOURS() function

JUSTIFY_HOURS() function

This function is used to adjust interval so 24-hour time periods are represented as days.

Syntax :

justify_hours(interval)

Return Type : interval.

PostgreSQL Version : 9.3

Pictorial Presentation of PostgreSQL JUSTIFY_HOURS() function

Example : PostgreSQL JUSTIFY_HOURS() function :

SELECT justify_hours(interval '32 hours');

Output :

 justify_hours
----------------
 1 day 08:00:00
(1 row)