Re: subtracting minutes from date

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: subtracting minutes from date
Дата
Msg-id 20060223232512.GJ2068@pervasive.com
обсуждение исходный текст
Ответ на Re: subtracting minutes from date  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
On Thu, Feb 23, 2006 at 03:08:32PM -0600, Scott Marlowe wrote:
> >   SELECT * FROM table WHERE date < now()::DATE::(TIMESTAMP - 60);
>
> Tell it you're subracting a minute:
>
> select now() - interval '13 minutes';

Or, better yet if you're feeding in a variable:

date < now() - ( 13 * '1 minute'::interval )
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Error correction to FAQ
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: now() time off