Re: Query to return every 1st Sat of a month between two dates

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Alex -'" <aintokyo(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query to return every 1st Sat of a month between two dates
Date: 2011-05-16 16:43:48
Message-ID: 011401cc13e8$6e898b30$4b9ca190$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Alex -
Sent: Wednesday, May 11, 2011 11:22 AM
To: pgsql-general(at)postgresql(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bernardo Telles 2011-05-16 17:12:30 Re: How do we combine and return results from multiple queries in a loop?
Previous Message Pavel Stehule 2011-05-16 14:55:57 Re: Remove Duplicate Words from a field