Re: Plpgsql function to compute "every other Friday"

From: "C(dot) Bensend" <benny(at)bennyvision(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Plpgsql function to compute "every other Friday"
Date: 2011-04-05 01:34:28
Message-ID: 39192caa4dd6f1f4d4eeb5a90fbead58.squirrel@webmail.stinkweasel.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> generate_series(date '2001-01-05', date '2020-12-31', interval '2 weeks')
>
>
> will return every payday from jan 5 2001 to the end of 2020 (assuming
> the 5th was payday, change the start to jan 12 if that was instead).

And THERE is the winner. I feel like an idiot for not even
considering generate_series().

Thanks a bunch, John! This will do nicely!

Benny

--
"Hairy ape nads." -- Colleen, playing Neverwinter Nights

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gordon Shannon 2011-04-05 02:28:14 could not access status of transaction 1118722281
Previous Message C. Bensend 2011-04-05 01:32:07 Re: Plpgsql function to compute "every other Friday"