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

Поиск
Список
Период
Сортировка
От Allan Engelhardt
Тема Re: Re: First Saturday and Last Saturday of a month
Дата
Msg-id 3B722F5A.68143B1E@cybaea.com
обсуждение исходный текст
Ответ на First Saturday and Last Saturday of a month  ("Brian C. Doyle" <bcdoyle@mindspring.com>)
Список pgsql-general
Tom Lane wrote:

> Allan Engelhardt <allane@cybaea.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.

I *knew* there had to be a better way, even if I couldn't think of it late last night :-)

Thanks, Tom.


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: First Saturday and Last Saturday of a month
Следующее
От: Nicholas Piper
Дата:
Сообщение: optimisation of outer join