| From: | Jose Manuel Lorenzo Lopez <jose-manuel(dot)lorenzo-lopez(at)ica(dot)conti(dot)de> | 
|---|---|
| To: | lockhart(at)fourpalms(dot)org, PGSQL <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: How to find out the weekday from a date??? | 
| Date: | 2001-07-17 15:15:57 | 
| Message-ID: | 200107171514.f6HFE2F36734@cmplant.conti.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
17.07.2001 16:59:33, Thomas Lockhart <lockhart(at)fourpalms(dot)org> wrote:
>> I want to extract the weekday of a given 'date' type field in my table
>> when selecting. How can I do this?
>...
>> select extract(dow from timestamp(day)), day, userid
>>  from bschft_days where date_part('month', day) = '3';
>...
>> ERROR:  parser: parse error at or near "dow"
>
>That seems to work on 7.1.x. Perhaps you are using an older version? In
>either case, you can try putting single quotes around "dow", like
>
>  select extract('dow' from timestamp(day)), day, userid
>   from bschft_days where date_part('month', day) = '3';
Hello Thomas,
I tried with the quotes but it doesn't work! :(
Is this a feature for PG 7.1.x only???
Best Regards / Mit freundlichen Grüßen / Un saludo
José Manuel Lorenzo López
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2001-07-17 15:32:06 | Re: trouble with triggers | 
| Previous Message | Fran Fabrizio | 2001-07-17 15:13:46 | Re: trouble with triggers |