RE: [SQL] timespan arithmetic

From: David Rose <David(dot)R(dot)Rose(at)disney(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: RE: [SQL] timespan arithmetic
Date: 1999-07-27 05:51:22
Message-ID: 199907270551.WAA24650@not.rd.wdi.disney.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jackson, DeJuan writes:
> I'm not certain this will work, but
> try:
> SELECT * FROM table
> WHERE loaded_time::datetime >= now()::datetime - '1
> days'::timespan
> ORDER BY loaded_time DESC;

Excellent! That did the trick. Many thanks!

(I feel a little stupid for not thinking of trying 'datetime' by
myself--I was running into a dead end with 'reltime'. Oh well.
Thanks!)

David

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Predrag Lesic 1999-07-27 09:21:19 SELECT .. WHERE field IN (SELECT .. )
Previous Message Jackson, DeJuan 1999-07-26 23:16:09 RE: [SQL] timespan arithmetic