G'Day to all those pgsql novices out there
I am trying to isolate those records where the active date is at least six months old
I have no problem if I use
SELECT * from newbuyers
WHERE activedate < '01/01/2003'
ORDER BY last_name
But I want to use a variable in the WHERE option
WHERE activedate < (current date less 188 days)
active date is a database date field
I would like to include the calculation in the WHERE statement, but if I can't should I create the (current date less 188 days) outside of the sql and bring it in as a <dtml-sqlvar ...> variable? and if so how?
Thanks to anyone who can help
John Haley