On Wed, May 11, 2011 at 10:22 AM, Alex - <aintokyo@xxxxxxxxxxx> wrote:
This is one way to do it:, there are others:
select '2011-01-01'::date + s.a as dates from generate_series(0,1095)
as s(a)
where to_char('2011-01-01'::date+s.a,'dd') between '01' and '07'
and to_char('2011-01-01'::date+s.a,'dy') = 'sat'
--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
This is one way to do it:, there are others:
select '2011-01-01'::date + s.a as dates from generate_series(0,1095)
as s(a)
where to_char('2011-01-01'::date+s.a,'dd') between '01' and '07'
and to_char('2011-01-01'::date+s.a,'dy') = 'sat'
Mike Nolan