Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A2645474E44 for ; Fri, 1 Nov 2002 17:07:05 -0500 (EST) Received: from ncsmtp03.ogw.rr.com (ncsmtp03.ogw.rr.com [24.93.67.84]) by postgresql.org (Postfix) with ESMTP id 20A1B475C26 for ; Fri, 1 Nov 2002 17:07:04 -0500 (EST) Received: from mail6.carolina.rr.com (fe6 [24.93.67.53]) by ncsmtp03.ogw.rr.com (8.12.5/8.12.2) with ESMTP id gA1M6liZ005765 for ; Fri, 1 Nov 2002 17:06:47 -0500 (EST) Received: from sews-101.mobile2.banm.com ([199.74.157.178]) by mail6.carolina.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Fri, 1 Nov 2002 17:07:10 -0500 Subject: Subtracting time fields From: Kevin Old To: pgsql-sql Content-Type: text/plain Organization: Message-Id: <1036188325.6778.67.camel@oc> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.1.2 (Preview Release) Date: 01 Nov 2002 17:05:26 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/23 X-Sequence-Number: 10165 Hello all, I have two fields in my database access_time and release_time.....I would like to calculate the "duration" between these two values, but can't figure out what to do. I've tried something like this but it doesn't work: select access_time, release_time, time(access_time) - time(release_time) as duration from mastertbl limit 10 Any suggestions? Thanks, Kevin -- Kevin Old