I'm using Postgres 9.1 and try to get records from a table knowing the given month and should know if the date type date field contains the month.
This is my query:
SELECT consejo.numero,consejo.fecha FROM consejo WHERE MONTH(consejo.fecha) = 2
but I get the following error:
ERROR: There is no month function (date)
LINE 1: ... T consejo.numero, consejo.fecha council FROM WHERE MONTH (cons ...
HINT: No function matches the name and types of arguments. You may need to add explicit type conversion.
might be wrong?