Reputation: 1110
how to get the current year from postgresql query, I tried like normal mysql query .But this is not working in postgresql?
SELECT YEAR(CURDATE());
Upvotes: 0
Views: 7875
Reputation:
In standard ANSI SQL (which is also supported by Postgres) this would be:
extract(year from current_date)
Upvotes: 1