From: | Max Baker <max(at)warped(dot)org> |
---|---|
To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
Cc: | PostgreSQL General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: age() and date intervals |
Date: | 2003-05-08 00:23:40 |
Message-ID: | 20030508002340.GJ24817@warped.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Karsten Hilbert | 2003-05-08 00:24:48 | Re: LC_COLLATE and index usage |
Previous Message | Jim C. Nasby | 2003-05-08 00:20:15 | Re: Many little databases or one big one? |