Hi,
I'm a newbie to Postgresql and have a problem manipulating dates in a
function...
In fact, I want a function to add some days to the current date and return
the result date.
My code would be something like :
/***************************************************************************
*********/
CREATE OR REPLACE FUNCTION AddDay( int ) RETURNS timestamp AS '
DECLARE
_INTdays ALIAS FOR $1;
_DTcurrent timestamp;
BEGIN
_DTcurrent := NOW() + interval ''_INTdays days'';
RETURN _DTcurrent;
END'
LANGUAGE 'plpgsql';
/***************************************************************************
*********/
I know there is an error in the date calculation but don't know how to
calculate it....
Thanks for your help.
Patrick Fiche
Patrick Fiche
email : patrick.fiche@aqsacom.com
tél : 01 69 29 36 18