Received: from mail.disney.com (IDENT:0@mail.disney.com [204.128.192.15]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA74575 for ; Tue, 27 Jul 1999 01:51:21 -0400 (EDT) (envelope-from drose@not.rd.wdi.disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (8.9.1/8.9.1) with SMTP id WAA22229 for ; Mon, 26 Jul 1999 22:51:19 -0700 (PDT) Received: from ford.wdi.disney.com by pain.corp.disney.com with ESMTP for pgsql-sql@postgresql.org; Mon, 26 Jul 1999 22:51:19 -0700 Received: from nufat.rd.wdi.disney.com (nufat [206.16.11.70]) by ford.wdi.disney.com (8.9.1/8.9.1/D1) with ESMTP id WAA25448 for ; Mon, 26 Jul 1999 22:51:32 -0700 (PDT) Received: from not.rd.wdi.disney.com (not [255.255.255.255]) by nufat.rd.wdi.disney.com (8.9.1/8.9.0) with SMTP id WAA218743 for <@nufat.rd.wdi.disney.com:pgsql-sql@postgresql.org>; Mon, 26 Jul 1999 22:51:33 -0700 (PDT) Received: (from drose@localhost) by not.rd.wdi.disney.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) id WAA24650; Mon, 26 Jul 1999 22:51:22 -0700 Date: Mon, 26 Jul 1999 22:51:22 -0700 Message-Id: <199907270551.WAA24650@not.rd.wdi.disney.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: David Rose To: pgsql-sql@postgresql.org Subject: RE: [SQL] timespan arithmetic In-Reply-To: References: X-Mailer: VM 6.33 under Emacs 19.34.2 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