| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> | 
|---|---|
| To: | "Krog, Kenneth" <KAKrog(at)MassMutual(dot)com> | 
| Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Working with dates and queries | 
| Date: | 2001-09-15 00:47:32 | 
| Message-ID: | Pine.LNX.4.30.0109150247160.691-100000@peter.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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(at)gmx(dot)net   http://funkturm.homeip.net/~peter
| From | Date | Subject | |
|---|---|---|---|
| Next Message | cnliou | 2001-09-15 00:54:58 | Re: need help | 
| Previous Message | Peter Eisentraut | 2001-09-15 00:46:03 | Re: Numerical DB/Table Names |