Re: Date manipulation

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Date manipulation
Дата
Msg-id 20040419032748.GC1881@wolff.to
обсуждение исходный текст
Ответ на Re: Date manipulation  (Hadley Willan <hadley.willan@deeperdesign.co.nz>)
Ответы Re: Date manipulation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Apr 19, 2004 at 11:18:23 +1200,
  Hadley Willan <hadley.willan@deeperdesign.co.nz> wrote:
> Thanks, that's pretty easy.
>
> I take it I could just use ''now'' instead of a date
>
> dateRange = ''now''::date - ( 7 * '1 week'::interval );

If you actually are using a date you don't have to use an interval as
the number subtracted will be in days. So you could just use
current_date - (7 * 7);

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

Предыдущее
От: Hadley Willan
Дата:
Сообщение: Re: Date manipulation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Date manipulation