Question : Using a date (now()) in ASP SQL query's WHERE statement

I am wanting to run the following query (which works with Access) on an SQL Server database

"SELECT * FROM qryETMailings WHERE ynFirstMailing = 0 and dtLeaseStarts < " & now()

The date syntax obviously needs to be different.

Can anyone guide me.

Answer : Using a date (now()) in ASP SQL query's WHERE statement

SELECT * FROM qryETMailings WHERE ynFirstMailing = 0 and Convert(varchar ,dtLeaseStarts,101) < Convert(varchar ,getdate(),101)"
Random Solutions  
 
programming4us programming4us