Re: Help With date/time

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Help With date/time
Дата
Msg-id 200311081423.36751.scrawford@pinpointresearch.com
обсуждение исходный текст
Ответ на Help With date/time  (Alex <alex@meerkatsoft.com>)
Список pgsql-general
On Saturday 08 November 2003 9:04 am, Alex wrote:
> Hi,
> I want to remove data that is older that a certain number of
> months.. only full months.
>
> example: today is 11-08 and I want do delete all data that is older
> than this month - 3 month i.e. i want to delete all information
> that is older than Aug. 1st.

select date_trunc('month', now()) - '3 months'::interval;
        ?column?
------------------------
 2003-08-01 00:00:00-07

Cheers,
Steve

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Calculating default values on insert?
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: Problem in restoring data