mrf3000
Programmer
- Feb 4, 2003
- 15
Hi,
Here is the problem. I have a range of dates for which I need to determine whether it is between 10 and 15 days. The first date is logged in a table say it would be 11/1/03. The last date is today's date so it would be 12/5/03. date1 is the field name in the table
I have it set up as for next loop
for dtdate = rst!DateLog to date()
strwhere1 = strwhere1 & " OR (datediff('d', date1," & dtdate & ">=10 and datediff('d',date1," & dtdate & "<15))"
next dtdate
now this strwhere1 statement is inserted into the rest of a sql statment however, when I debug the sql statement it takes the date1 as a literal instead of as a field name. This might be really something simple which I have overlooked but any help would be appreciated. I tried using brackets, back quotes, etc...but nothing seems to work.
Thanks,
Marc
Here is the problem. I have a range of dates for which I need to determine whether it is between 10 and 15 days. The first date is logged in a table say it would be 11/1/03. The last date is today's date so it would be 12/5/03. date1 is the field name in the table
I have it set up as for next loop
for dtdate = rst!DateLog to date()
strwhere1 = strwhere1 & " OR (datediff('d', date1," & dtdate & ">=10 and datediff('d',date1," & dtdate & "<15))"
next dtdate
now this strwhere1 statement is inserted into the rest of a sql statment however, when I debug the sql statement it takes the date1 as a literal instead of as a field name. This might be really something simple which I have overlooked but any help would be appreciated. I tried using brackets, back quotes, etc...but nothing seems to work.
Thanks,
Marc