>Instead of passing the DATETIME() function simply store it in a variable and have your query as...
I don't think so. The Problem is that the WHERE clause is sent to SQL server which
knows nothing about DATE() or DATETIME(). I think it might work with a straight
variable.
I managed to work around it by using SQL Server's DateDiff() function (oh yeah,
how intuitive) or by converting the date to a string which is how SQL
server expects it in literal comparisons. Neither was very obvious, but it worked.
Thanks,