I am used to working in access and have a project where I am using sql server. I am trying to find dates in a field between two other dates. Here is one of many variations I have tryed.
tourndis= Now()
tournreg= Now() + 6
sqlstr="Select tournname, tourndat from tournaments WHERE tourndat BETWEEN " & tourndis & " AND " & tournreg
When I response.write the sqlstr things look ok. Other variations have caused errors and some have appeared to have done nothing.
tourndat is a smalldatetime field with a date like 8/16/2008
Any help would be greatly appreciated, my mind is numb at this point.
tourndis= Now()
tournreg= Now() + 6
sqlstr="Select tournname, tourndat from tournaments WHERE tourndat BETWEEN " & tourndis & " AND " & tournreg
When I response.write the sqlstr things look ok. Other variations have caused errors and some have appeared to have done nothing.
tourndat is a smalldatetime field with a date like 8/16/2008
Any help would be greatly appreciated, my mind is numb at this point.