Re: Query to return every 1st Sat of a month between two dates - Mailing list pgsql-general

From David Johnston
Subject Re: Query to return every 1st Sat of a month between two dates
Date
Msg-id 011401cc13e8$6e898b30$4b9ca190$@yahoo.com
Whole thread Raw
In response to Query to return every 1st Sat of a month between two dates  (Alex - <aintokyo@hotmail.com>)
List pgsql-general

Start with January 1st, 2011

Generate Series 0 ~ 200

Add (Series# * 7) Days to January 1st := CheckDate

Filter where day(CheckDate) <= 7

Filter where CheckDate <= December 31st 2013

 

David J.

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alex -
Sent: Wednesday, May 11, 2011 11:22 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Query to return every 1st Sat of a month between two dates

 

Hi,

is there an easy way to return the date of every first Saturday of a month in a data range i.e. 2011-2013

 

Any help would be appreciated

 

Thanks

Alex 

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Remove Duplicate Words from a field
Next
From: Bernardo Telles
Date:
Subject: Re: How do we combine and return results from multiple queries in a loop?