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

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Query to return every 1st Sat of a month between two dates
Дата
Msg-id 011401cc13e8$6e898b30$4b9ca190$@yahoo.com
обсуждение исходный текст
Ответ на Query to return every 1st Sat of a month between two dates  (Alex - <aintokyo@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Remove Duplicate Words from a field
Следующее
От: Bernardo Telles
Дата:
Сообщение: Re: How do we combine and return results from multiple queries in a loop?