SELECT the last day of the month

suggest change

You can select the last day of a month.

SELECT (date_trunc('MONTH', ('201608'||'01')::date) + INTERVAL '1 MONTH - 1 day')::DATE;

Replace 201608 with another YYYYMM value. The expression truncates to the first of that month, adds one month, then subtracts one day.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents