X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D49C7D1B188 for ; Fri, 4 Jun 2004 11:48:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38318-09 for ; Fri, 4 Jun 2004 14:48:18 +0000 (GMT) Received: from mail.cobweb.nl (mx1.cobweb.nl [80.242.96.4]) by svr1.postgresql.org (Postfix) with ESMTP id 685B6D1B470 for ; Fri, 4 Jun 2004 11:48:16 -0300 (ADT) Received: from farcourier.com (dp3-26.dsl.cobweb.nl [193.67.120.154] (may be forged)) by mail.cobweb.nl (8.12.8/8.12.7) with ESMTP id i54EmG2H021264 for ; Fri, 4 Jun 2004 16:48:16 +0200 (CEST) (envelope-from s.vanroye@Farcourier.com) Subject: Re: Difference between two times as a numeric value in a stored procedure. [Scanned] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 4 Jun 2004 16:44:57 +0200 Content-Class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Message-ID: <736CEAA26E7E3F48943458F760E7A326010CE4@fs1010.farcourier.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Difference between two times as a numeric value in a stored procedure. [Scanned] thread-index: AcRKPXSa25dpoAvWQ4WmnMd6UqMFfAABMUgA From: "Stijn Vanroye" To: "Tom Lane" Cc: X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200406/31 X-Sequence-Number: 17976 > "Stijn Vanroye" writes: > > I can't seem to find a way to substract two time values (or > > timestamp values) and get a numeric/float value. I always get the > > INTERVAL datatype. >=20 > extract(epoch from interval) may help. >=20 > regards, tom lane Indeed. I think I should kick myself for missing that, I have read that sec= tion af the manual four times or so, and missed it over and over again :) Thanks for the help. Regards, Stijn Vanroye.