From: | "Mitch Vincent" <mvincent(at)cablespeed(dot)com> |
---|---|
To: | "PGSQL" <pgsql-general(at)postgresql(dot)org>, "Jose Manuel Lorenzo Lopez" <jose-manuel(dot)lorenzo-lopez(at)ica(dot)conti(dot)de> |
Subject: | Re: How to find out the weekday from a date??? |
Date: | 2001-07-17 14:50:33 |
Message-ID: | 006701c10ecf$d4e374a0$1251000a@Mitch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I modified that query to use the names in a table I have (date columns) and
the query worked fine... What version of PG are you using?
-Mitch
----- Original Message -----
From: "Jose Manuel Lorenzo Lopez" <jose-manuel(dot)lorenzo-lopez(at)ica(dot)conti(dot)de>
To: "PGSQL" <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, July 17, 2001 10:24 AM
Subject: [GENERAL] How to find out the weekday from a date???
> Hello PG's,
>
> I want to extract the weekday of a given 'date' type field in my table
> when selecting. How can I do this?
>
> For example in a table "bschft_days" filled with values with type 'date'
>
> I want to select all the days within the month 'march' and output the
respective
> weekday. I tryed this:
>
> select extract(dow from timestamp(day)), day, userid from bschft_days
where date_part('month', day) = '3';
>
> But it only tells me:
>
> ERROR: parser: parse error at or near "dow"
>
> :(
>
> Any ideas??
>
> Thanks a lot in advance!
>
> Best Regards / Mit freundlichen Grüßen / Un saludo
>
> José Manuel lorenzo López
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ryan Mahoney | 2001-07-17 14:56:31 | Re: How to find out the weekday from a date??? |
Previous Message | Mitch Vincent | 2001-07-17 14:46:05 | Re: trouble with triggers |