Re: age() and date intervals

Поиск
Список
Период
Сортировка
От Max Baker
Тема Re: age() and date intervals
Дата
Msg-id 20030508002340.GJ24817@warped.org
обсуждение исходный текст
Ответ на Re: age() and date intervals  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Steve,

Thanks for the help!

I see what my problem was, I assumed that age(timestamp) was operating
from NOW instead of TODAY (00:00 midnight).

-m
On Wed, May 07, 2003 at 05:13:51PM -0700, Steve Crawford wrote:
> No problem - check the docs at:
> http://www14.us.postgresql.org/users-lounge/docs/7.2/postgres/functions-datetime.html
>
> 1 argument: age(timestamp) = subtract timestamp from today
> 2 arguments: age(timestamp, timestamp) = difference between the two timestamps
>
> Pick the one you need or just subtract:
> now()-last_discover > '1 day'::interval
>
> Cheers,
> Steve


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Many little databases or one big one?
Следующее
От: Ralph Graulich
Дата:
Сообщение: Re: LC_COLLATE and index usage