From: | "tamsin" <tg_mail(at)bryncadfan(dot)co(dot)uk> |
---|---|
To: | "PGSQL" <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: How to find out the weekday from a date??? |
Date: | 2001-07-17 16:20:52 |
Message-ID: | NEBBKHBOBMJCHDMGKCNJAECKDBAA.tg_mail@bryncadfan.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
why not use the date_part function again...
select date_part('dow',day), day, userid from bschft_days where
date_part('month', day) = '3';
hth
tamsin
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Jose Manuel
Lorenzo Lopez
Sent: 17 July 2001 15:25
To: PGSQL
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?
From | Date | Subject | |
---|---|---|---|
Next Message | Feite Brekeveld | 2001-07-17 16:36:25 | Re: trouble with triggers |
Previous Message | Kapil Tilwani | 2001-07-17 16:14:40 | Fw: Query Optimisation required |