On Wed, Mar 09, 2005 at 10:58:05AM +0200, Fatih Cerit wrote:

> Is there anyone at there who knows howto use dateadd in pgsql. I have a 
> problem in my function that is like this ;
> 
> Select into futuredate now() + interval '30 days';  <- this is ok
> but how can I use a variable intead of '30 days'    :(

Are you looking for something like this?

ndays := 30;
SELECT INTO futuredate now() + ndays * interval'1 day';

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to