Re: [GENERAL] Selecting between dates

1999-08-10 Thread Wim Kerkhoff
Thanks Aaron, That is exactly what I wanted. Much more simple then what I was thinking. On 10-Aug-99 Aaron Seigo wrote: > hi wim.. > >>select * from company where created >>is between (lastpaid + 14 days) and (created + 28 days); > > assuming that lastpaid and created are dates, pgsql will

Re: [GENERAL] Selecting between dates

1999-08-10 Thread Aaron Seigo
hi wim.. >select * from company where created >is between (lastpaid + 14 days) and (created + 28 days); assuming that lastpaid and created are dates, pgsql will handle the addition quite nicely for you... as examples: test=> select '4-1-1999'::date + 7; ?column? -- 04-08-1999 (1 row)

[GENERAL] Selecting between dates

1999-08-10 Thread Wim Kerkhoff
Hi, I am creating a script that sends out reminders to subscribers to a site who have not paid. I can't figure out the math that will add 7 days to a date. I want something like this: select * from company where created is between (lastpaid + 14 days) and (created + 28 days); I can't figure