From: Michael Chaney <mdchaney@michaelchaney.com>
To: pgsql-sql@postgresql.org
Subject: Re: Convert INT to INTERVAL?
Date: Fri, 27 Feb 2004 12:07:05 -0600
Message-ID: <20040227180705.GC8807@michaelchaney.com> (raw)
In-Reply-To: <403F762B.20002@aol.net>
References: <403F762B.20002@aol.net>
On Fri, Feb 27, 2004 at 11:54:04AM -0500, 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?
select (1||' months')::interval;
You should be able to replace the "1" with your integer variable.
Michael
--
Michael Darrin Chaney
mdchaney@michaelchaney.com
http://www.michaelchaney.com/
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: mdchaney@michaelchaney.com
Subject: Re: Convert INT to INTERVAL?
In-Reply-To: <20040227180705.GC8807@michaelchaney.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