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 ACD943A5AC8 for ; Tue, 11 Jan 2005 22:21:25 +0000 (GMT) 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 88956-10 for ; Tue, 11 Jan 2005 22:21:20 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id E9DE53A5AFB for ; Tue, 11 Jan 2005 22:21:22 +0000 (GMT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 534EB357C0; Tue, 11 Jan 2005 14:21:22 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 51D5F357BE; Tue, 11 Jan 2005 14:21:22 -0800 (PST) Date: Tue, 11 Jan 2005 14:21:22 -0800 (PST) From: Stephan Szabo To: Terry Lee Tucker Cc: pgsql-sql@postgresql.org Subject: Re: Simple Question In-Reply-To: <200501111642.21716.terry@esc1.com> Message-ID: <20050111141941.U5847@megazone.bigpanda.com> References: <200501111642.21716.terry@esc1.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/47 X-Sequence-Number: 19835 On Tue, 11 Jan 2005, Terry Lee Tucker wrote: > Hello: > > I'm trying to figure out how to convert a floating point value into an > interval of time. I'm calculating the time required to drive from point A to > point B. For the sake of this question, we'll just say it is miles/speed. So: > > drv_time = 478 / 45.0; > > The value of this is: 10.6222222222222222 I think something like 478/45.0 * interval '1 hour' may do what you want.