Re: Question on interval

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Wei Weng" <wweng(at)kencast(dot)com>
Subject: Re: Question on interval
Date: 2007-04-20 19:29:05
Message-ID: a55915760704201229s24b2004fgf0e8c566886fe4af@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 4/20/07, Wei Weng <wweng(at)kencast(dot)com> wrote:
> Hi all.
>
> How do I write a query that converts an interger to the interval type?
>
> Like convert integer 10 to INTERVAL '10 seconds'?
>
> The integer is a column in a table though, so it is more like convert
> integer tbl.theInteger to INTERVAL 'tbl.theInteger seconds".
>
> Thanks!
>
>
> Wei

select (10||' sec')::interval;

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2007-04-20 19:35:29 Re: Question on interval
Previous Message Wei Weng 2007-04-20 18:53:40 Question on interval