PostgreSQL JUSTIFY DAYS Function

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

PostgreSQL JUSTIFY_DAYS() function

JUSTIFY_DAYS() function

This function is used to adjust interval so 30-day time periods are represented as months.

Syntax :

justify_days(interval)

Return Type :interval.

PostgreSQL Version : 9.3

Pictorial Presentation of PostgreSQL JUSTIFY_DAYS() function

 

Example 1 : PostgreSQL JUSTIFY_DAYS() function

SELECT justify_days(interval '47 days');

Output :

 justify_days
---------------
 1 mon 17 days
(1 row)