On 27 Sep 2001, Andrew McMillan wrote:
> On Thu, 2001-09-27 at 08:30, Vince Vielhaber wrote:
> >
> > I'm trying to use an integer from a table to add/subtract time in months.
> > IOW:
> >
> > create table foo(nummonths int);
> >
> > select now() - nummonths months;
>
> newsroom=# select now() - interval( text(3) || ' months');
> ?column?
> ------------------------
> 2001-06-27 08:56:27+12
> (1 row)
>
>
> Crude, but hey: it works :-)
It certainly does! Thanks!
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net 56K Nationwide Dialup from $16.00/mo
atPop4 Networking Online Campground Directory http://www.camping-usa.com Online Giftshop Superstore
http://www.cloudninegifts.com
==========================================================================