Talk:Date LastDay

From PostgreSQL wiki

Revision as of 20:24, 20 January 2012 by Brsa (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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