pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Brian Knox <laotse@aol.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Convert INT to INTERVAL?
Date: Fri, 27 Feb 2004 09:28:00 -0800 (PST)
Message-ID: <20040227092735.N87097@megazone.bigpanda.com> (raw)
In-Reply-To: <403F762B.20002@aol.net>
References: <403F762B.20002@aol.net>

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.



view thread (5+ messages)  latest in thread

Message-ID: <20040227092735.N87097@megazone.bigpanda.com>
Permalink:  ../20040227092735.N87097@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040227092735.N87097@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, laotse@aol.net
  Subject: Re: Convert INT to INTERVAL?
  In-Reply-To: <20040227092735.N87097@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