title: "justify_days function" description: "Adjust interval so 30-day time periods are represented as months" menu: main:
parent: 'sql-functions'
justify_days
returns a new interval
such that 30-day time periods are
converted to months.
{{< diagram "func-justify-days.svg" >}}
Parameter | Type | Description |
---|---|---|
interval | interval |
The interval value to justify. |
justify_days
returns an interval
value.
SELECT justify_days(interval '35 days');
justify_days
----------------
1 month 5 days