Re: Convert INT to INTERVAL?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Brian Knox <laotse(at)aol(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Convert INT to INTERVAL?
Date: 2004-02-27 17:28:00
Message-ID: 20040227092735.N87097@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 27 Feb 2004, Brian Knox wrote:

> Is it possible within pl/pgsql, to convert an integer to an interval in
> months? IE, if num_months is an INT set to 48, can it be converted to an
> interval?

You should be able to say something like
num_months * INTERVAL '1 month'
I believe.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David 2004-02-27 17:29:12 Re: searching polygons
Previous Message Brian Knox 2004-02-27 16:54:04 Convert INT to INTERVAL?