Talk:Date LastDay

From PostgreSQL wiki

Jump to: navigation, search

I would suggest

 SELECT date_trunc('month', $1 + interval '1 month')::date - 1;

instead of:

 SELECT (date_trunc('MONTH', $1) + INTERVAL '1 MONTH - 1 day')::date;
Personal tools