casting for dates

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: casting for dates
Date: 2001-09-26 20:30:52
Message-ID: Pine.BSF.4.30.0109261627240.55979-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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;

So far nothing I've tried will work - short of a function. Is there a
way to do this?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Rogers 2001-09-26 20:42:45 Re: PostgreSQL / PHP Overrun Error
Previous Message Bruce Momjian 2001-09-26 20:22:06 Re: Problem with setlocale (found in libecpg) [accessing a