From: Terry Lee Tucker <terry@esc1.com>
To: pgsql-sql@postgresql.org
Subject: Re: Simple Question
Date: Tue, 11 Jan 2005 17:18:50 -0500
Message-ID: <200501111718.50810.terry@esc1.com> (raw)
In-Reply-To: <20050111221545.GA9759@winnie.fuhr.org>
References: <200501111642.21716.terry@esc1.com>
<20050111221545.GA9759@winnie.fuhr.org>
Thank you for the reply in spite of the subject.
On Tuesday 11 January 2005 05:15 pm, Michael Fuhr saith:
> 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.
I will do this in the future.
>
> > 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';
I like your soultion better than mine. Thanks for the answer.
>
> For more information, see "Date/Time Functions and Operators" in
> the documentation.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
Work: 1-336-372-6812
Cell: 1-336-363-4719
email: terry@esc1.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: terry@esc1.com
Subject: Re: Simple Question
In-Reply-To: <200501111718.50810.terry@esc1.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox