Created
March 16, 2018 11:35
-
-
Save barsbek/e8c1da29f6d7653a1f6458a613782833 to your computer and use it in GitHub Desktop.
postgresql: extract month from date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select date_part('month', '2011-10-22'); -- 10 | |
select extract(month from '2011-12-22'); -- 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment