Re: age() and date intervals - Mailing list pgsql-general

From Max Baker
Subject Re: age() and date intervals
Date
Msg-id 20030508002340.GJ24817@warped.org
Whole thread Raw
In response to Re: age() and date intervals  (Steve Crawford <scrawford@pinpointresearch.com>)
List 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 by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Many little databases or one big one?
Next
From: Ralph Graulich
Date:
Subject: Re: LC_COLLATE and index usage