can also use the current_date function:
select (current_date)+3;
jt
-----Original Message-----
From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent: Monday, March 13, 2000 9:34 AM
To: edNET System Admin
Cc: [EMAIL PROTECTED]
Subject: Re: [GENERAL] Date problem
i'm not sure about perl but a way to do it i psql:
select (now()+'3 days') from anytable;
Thu 16 Mar 15:34:12 2000
i did it today(monday)
On Sun, 12 Mar 2000, edNET System Admin wrote:
> Hi, I'm trying to do something with dates which is proving to be a bit
> tricky.
>
> I'm trying to get the current "date" and add 3 days to this.
>
>
> I've tried:
>
> $date = "(now::date) + ('3 days'::interval)";
>
> DBD::Pg::st execute failed: ERROR: parser: parse error at or near "3"
>
>
> ... and :
>
> $date = "(now::date) + (\\'3 days\\'::timespan)";
>
> DBD::Pg::st execute failed: ERROR: Bad date external representation
> '(now::date) + ('3 days'::timespan)'
>
> Needless to say I'm using this date creation string as a parameter of a
> DBD::Pg CGI query, hence further complications with apostrophes.
>
> I've found nothing concrete in the documentation about how to do this, and
> the closest thing to an answer came from this newsgroup. No luck so far
> tho'
>
> does anyone know how to do this and possibly and source of good
> documentation on this type of thing.
>
> Regards
>
> Scott McDaid
> edNET
> t: +44 131 625 5557 (direct dial)
> t: +44 131 466 7003 (office)
>
>