I am trying to return records in a standard ASP page where the date meets a certain criteria. I am able to do this in the query manager in SQL Server 2005 Express fine whiich is where the database is using the following statement
Select * from tblCallHIstory Where calldatetime > dateadd(day, datediff(day,0,getdate()),0)-4
but when I convert this to use it on an asp page using the following it returns all records.
Select * from tblCallHIstory Where calldatetime > dateadd("d", datediff("d",0,now()),0)-4
Can anyone see where the flaw is in my logic?