Re: grabbing date of last Sunday? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: grabbing date of last Sunday?
Date
Msg-id 48EF767D.5030105@iol.ie
Whole thread Raw
In response to grabbing date of last Sunday?  ("blackwater dev" <blackwaterdev@gmail.com>)
Responses Re: grabbing date of last Sunday?  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
On 10/10/2008 16:29, blackwater dev wrote:
> How can I grab the date from the last Sunday based on when I run the query?

select
  current_date
    - (extract(dow from current_date) || ' days')::interval;

:-)

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: "blackwater dev"
Date:
Subject: grabbing date of last Sunday?
Next
From: Pascal Cohen
Date:
Subject: Re: Improve dump and restore time