Hi, I am creating an small application page in which I need to find birthdays of people in a contact table coming up in the next 7 days. I set the variables yesterday and week using dateAdd and Now(), which both become the respective correct dates. I then do a SQL query to find all contacts that have birthdays in the next 7. Besides the normal select and from statements I use:
WHERE #yesterday# < Birthday < #week#
The problem is no records are returned.
I believe that this is because the SQL code may equal this:
WHERE 6/20/2001 < 6/23/1975 < 6/28/2001
and no records may be coming up because the years do not match. I tried using DateFormat when I set the original variables for 'yesterday' and 'week' to display as: month/day, but when I try to use the DateFormat function to format the 'Birthday' in the SQL query I get an error.
Any help would be greatly appreciated!!! Thanks!!
Jimmy
WHERE #yesterday# < Birthday < #week#
The problem is no records are returned.
I believe that this is because the SQL code may equal this:
WHERE 6/20/2001 < 6/23/1975 < 6/28/2001
and no records may be coming up because the years do not match. I tried using DateFormat when I set the original variables for 'yesterday' and 'week' to display as: month/day, but when I try to use the DateFormat function to format the 'Birthday' in the SQL query I get an error.
Any help would be greatly appreciated!!! Thanks!!
Jimmy