pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: aklaver@comcast.net
Cc: pgsql-sql@postgresql.org
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Date: Wed, 26 Mar 2008 13:14:28 -0400
Message-ID: <29426.1206551668@sss.pgh.pa.us> (raw)
In-Reply-To: <032620081632.25756.47EA7AA200070FAB0000649C22007374789D0A900E04050E@comcast.net>
References: <032620081632.25756.47EA7AA200070FAB0000649C22007374789D0A900E04050E@comcast.net>

aklaver@comcast.net (Adrian Klaver) writes:
> select ('134987'::int/1000.00) * interval ' 1 second' ;
>     ?column?
>  --------------
>   00:02:14.987
>  (1 row)

Or even easier:

regression=# select 134987 * interval '1 msec';
   ?column?   
--------------
 00:02:14.987
(1 row)


			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <29426.1206551668@sss.pgh.pa.us>
Permalink:  ../29426.1206551668@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29426.1206551668@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, aklaver@comcast.net
  Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
  In-Reply-To: <29426.1206551668@sss.pgh.pa.us>

* 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