Home

Published

- 1 min read

postgresql get last day of month

img of postgresql get last day of month

The solution for this is noted below

postgresql get last day of month

Solution

   SELECT (date_trunc('month', '2017-01-05'::date) + interval '1 month' - interval '1 day')::date
AS end_of_month;

Try other methods by searching on the site. That is if this doesn’t work