Re: Simple Question

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Terry Lee Tucker <terry(at)esc1(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Simple Question
Date: 2005-01-11 22:21:22
Message-ID: 20050111141941.U5847@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Terry Lee Tucker 2005-01-11 22:21:25 Re: Simple Question
Previous Message Terry Lee Tucker 2005-01-11 22:18:50 Re: Simple Question