Dreadful title right? Thought I'd see if Stack overflow is quicker than me testing something while I get a thousand interruptions from other work :)
I'm updating an old VB net application and trying to refactor some of the logic as I go. The app looks for data from a single date across a few tables and writes that view to a file.
Writing the query in SQL I'd get the equivalent of
SELECT * FROM table
WHERE CAST(FLOOR(CAST(table.date AS float))AS datetime) = '15-Jul-2010'
Ideally I'd use
SELECT * FROM table WHERE date=@input
and add a date object as a parameter to a System.Data.SqlClient.SqlCommand instance
Are those two comparable? Will I get the results I expect?