Re: Working with dates and queries - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Working with dates and queries
Date
Msg-id Pine.LNX.4.30.0109150247160.691-100000@peter.localdomain
Whole thread Raw
In response to Working with dates and queries  ("Krog, Kenneth" <KAKrog@MassMutual.com>)
List pgsql-general
http://www.de.postgresql.org/users-lounge/docs/7.1/postgres/

Krog, Kenneth writes:

>
> 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
>
>

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: Linh Luong
Date:
Subject: Diabling constraints
Next
From:
Date:
Subject: Re: need help