Re: EASY QUESTION!! - Mailing list pgsql-sql

From Josh Berkus
Subject Re: EASY QUESTION!!
Date
Msg-id 200304301341.35146.josh@agliodbs.com
Whole thread Raw
In response to EASY QUESTION!!  (dvsangel@dodo.com.au (dvsangel))
List pgsql-sql
DVS,

> a column in one of my tables contains dates in the format yyyy-mm-dd
> From these dates I need to find out which dates are sundays.
> can anyone help me????
> PLEASE???

SELECT extract(dow from <date field>)

I believe that 0 is sunday.

--
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Stored Procedure Question
Next
From: Tom Lane
Date:
Subject: Re: PERFORM / FOUND, what's up?