Re: [SQL] DateAdd function ?

2005-04-19 Thread Jeff Eckermann
Zlatko MatiƦ [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am currently migrating from MSDE to PostgreSQL and have to rewrite the function that is calculating next date of sampling... In MSDE there is a DateAdd function. I can't find the appropriate function in postgre. Can you

Re: [SQL] DateAdd function ?

2005-04-19 Thread Tom Lane
Jeff Eckermann [EMAIL PROTECTED] writes: There is no dateadd function in PostgreSQL, but you can write your own easily enough. The following should give you an idea of the logic you can use: jeck=# select current_date + cast('1 day' as interval); Alternatively, maybe you want to use the