pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Terry Lee Tucker <terry@esc1.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Simple Question
Date: Tue, 11 Jan 2005 14:21:22 -0800 (PST)
Message-ID: <20050111141941.U5847@megazone.bigpanda.com> (raw)
In-Reply-To: <200501111642.21716.terry@esc1.com>
References: <200501111642.21716.terry@esc1.com>


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.



view thread (15+ messages)  latest in thread

Message-ID: <20050111141941.U5847@megazone.bigpanda.com>
Permalink:  ../20050111141941.U5847@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20050111141941.U5847@megazone.bigpanda.com

 · 

reply

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: sszabo@megazone.bigpanda.com, terry@esc1.com
  Subject: Re: Simple Question
  In-Reply-To: <20050111141941.U5847@megazone.bigpanda.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