Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 908839FB283 for ; Wed, 7 Feb 2007 17:26:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 04867-03 for ; Wed, 7 Feb 2007 17:25:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 016AC9FACFE for ; Wed, 7 Feb 2007 17:25:38 -0400 (AST) Received: (qmail 16869 invoked by uid 500); 7 Feb 2007 21:25:19 -0000 Date: Wed, 7 Feb 2007 15:25:19 -0600 From: Bruno Wolff III To: Aarni =?iso-8859-1?Q?Ruuhim=E4ki?= Cc: pgsql-sql@postgresql.org Subject: Re: interval as hours or minutes ? Message-ID: <20070207212519.GA14268@wolff.to> Mail-Followup-To: Bruno Wolff III , Aarni =?iso-8859-1?Q?Ruuhim=E4ki?= , pgsql-sql@postgresql.org References: <200702071903.35126.aarni@kymi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200702071903.35126.aarni@kymi.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/67 X-Sequence-Number: 27401 On Wed, Feb 07, 2007 at 19:03:35 +0200, Aarni Ruuhimäki wrote: > > Could anyone please tell an easy way to get total hours or minutes from an > interval ? Extract the epoch from the interval and divide by the number of seconds in the period of time that applies and apply appropiate rounding.