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 15AD83A5ADD for ; Tue, 11 Jan 2005 22:16:24 +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 89640-01 for ; Tue, 11 Jan 2005 22:16:10 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 3F3983A5AE0 for ; Tue, 11 Jan 2005 22:16:11 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0BMFlVp050514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Jan 2005 15:15:49 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0BMFl7Q027160; Tue, 11 Jan 2005 15:15:47 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0BMFkEE027159; Tue, 11 Jan 2005 15:15:46 -0700 (MST) (envelope-from mfuhr) Date: Tue, 11 Jan 2005 15:15:46 -0700 From: Michael Fuhr To: Terry Lee Tucker Cc: pgsql-sql@postgresql.org Subject: Re: Simple Question Message-ID: <20050111221545.GA9759@winnie.fuhr.org> References: <200501111642.21716.terry@esc1.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200501111642.21716.terry@esc1.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/46 X-Sequence-Number: 19834 On Tue, Jan 11, 2005 at 04:42:21PM -0500, Terry Lee Tucker wrote: > Subject: [SQL] Simple Question Please use a more descriptive subject -- think about how somebody looking at a list of 200 messages, all with subjects like "Simple Question" or "PostgreSQL Question," would decide to look at yours. > drv_time = 478 / 45.0; > > The value of this is: 10.6222222222222222 > > Is there a way of converting this value to an interval. It seems that INTERVAL > only works with a quoted literal value. You can do arithmetic on intervals: SELECT 478 / 45.0 * interval'1 hour'; For more information, see "Date/Time Functions and Operators" in the documentation. -- Michael Fuhr http://www.fuhr.org/~mfuhr/