X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C919DD1B967 for ; Thu, 28 Aug 2003 15:41:54 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 36459-08 for ; Thu, 28 Aug 2003 12:41:24 -0300 (ADT) Received: from frank.mercea.net (h00e098800766.ne.client2.attbi.com [24.60.114.239]) by svr1.postgresql.org (Postfix) with ESMTP id A447CD1B8A5 for ; Thu, 28 Aug 2003 12:41:23 -0300 (ADT) Received: from frank.mercea.net (localhost [127.0.0.1]) by frank.mercea.net (Postfix) with SMTP id 263DF516AB; Thu, 28 Aug 2003 11:45:11 -0400 (EDT) Received: from 63.142.161.101 (SquirrelMail authenticated user brett) by frank.mercea.net with HTTP; Thu, 28 Aug 2003 11:45:11 -0400 (EDT) Message-ID: <64358.63.142.161.101.1062085511.squirrel@frank.mercea.net> In-Reply-To: <3F4E1449.5040807@klaster.net> References: <61031.63.142.161.101.1062077015.squirrel@frank.mercea.net> <3F4E1449.5040807@klaster.net> Date: Thu, 28 Aug 2003 11:45:11 -0400 (EDT) Subject: Re: interval conversion From: "Brett Dikeman" To: "Tomasz Myrta" Cc: pgsql-sql@postgresql.org Reply-To: brett@cloud9.net User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/346 X-Sequence-Number: 14962 >> I have a possibly stupid question- I'm doing some time calculations yielding >> intervals, and for my purposes I need to convert the interval(say, "1 day 8 >> hours") into (floating point) hours. While there's a plethora of handy >> date_extract functionality and the like, I need a conversion. >> >> Any suggestions on how to accompish this? Simpler the better, of course. > > extract(epoch from some_interval)/3600 [slaps head] I swear, I studied the date/time sections of the manual for quite some time...really...Siiiigh :-) Thanks Tomasz! Brett