Jump to: navigation, search

PostgreSQL JUSTIFY DAYS

From w3cyberlearnings

Contents

Postgresql justify_days

This function returns the adjust interval period to month and day for a given days. (30 days periods represented as 1 month)

Syntax justify_days

justify_days(interval);

Example 1

postgres=# SELECT justify_days(interval '40 days');
 justify_days  
---------------
 1 mon 10 days
(1 row)

postgres=# SELECT justify_days(interval '2440 days');
      justify_days      
------------------------
 6 years 9 mons 10 days
(1 row)

Related Links



Navigation
Web
SQL
MISC
References