Re: Re: First Saturday and Last Saturday of a month

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Allan Engelhardt <allane(at)cybaea(dot)com>
Cc: "Brian C(dot) Doyle" <bcdoyle(at)mindspring(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: First Saturday and Last Saturday of a month
Date: 2001-08-09 02:11:59
Message-ID: 21131.997323119@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Allan Engelhardt <allane(at)cybaea(dot)com> writes:
> Last Saturday problem is similar to above except for some sign
> reversals, but more interesting as you need the number of days in the
> month.

I'd be inclined to take the first day of the *next* month (relatively
easy to figure), and then back up to a Saturday using the 'dow' value
for that day.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yusron Hilmy 2001-08-09 02:17:18 getting result information of DECLARE CURSOR statement
Previous Message Justin Clift 2001-08-09 01:51:43 Re: Re: Mirroring the database?