Working with dates and queries

From: "Krog, Kenneth" <KAKrog(at)MassMutual(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Working with dates and queries
Date: 2001-09-13 16:45:30
Message-ID: 2B592A1461C5D411919B0002A51350A204B369B7@exch9.private.massmutual.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I am attempting to do a query for a specific month based of a response for a
web site using php as the engine.
The syntax of the sql is simple

"SELECT * FROM table WHERE MONTH(fieldname)=08;"

note:
the fieldname is set to be a date field.

Is this correct postgre syntax to find a date by month?

If so: the fieldname I used was "date" since it is a researved word will
this cause problems?
If not what is the correct syntax?

Thanks in advance

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ryan Mahoney 2001-09-13 16:51:22 Re: business perspective
Previous Message Thurstan R. McDougle 2001-09-13 16:38:56 Re: count of occurences PLUS optimisation