Skip to content

Instantly share code, notes, and snippets.

@barsbek
Created March 18, 2018 14:19
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 barsbek/3e6264dbfb5e9c489e2ae05185f8956f to your computer and use it in GitHub Desktop.
Save barsbek/3e6264dbfb5e9c489e2ae05185f8956f to your computer and use it in GitHub Desktop.
postgreslq: truncate timestamp to precision
select date_trunc('month', '2011-12-12'); -- '2011-12-01 00:00:00.000000'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment