Skip to content

Instantly share code, notes, and snippets.

@cetver
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cetver/c0ee6308391c98892c0e to your computer and use it in GitHub Desktop.
Save cetver/c0ee6308391c98892c0e to your computer and use it in GitHub Desktop.
posgtesql: last date of month
SELECT (date_trunc('MONTH', now()) + INTERVAL '1 MONTH - 1 day 23:59:59')::timestamp without time zone;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment