Can anyone tell me why a specific string will work but a date() will not?
I have a simple "select" from a table
sql = "SELECT *, convert( varchar(20), started, 101 ) as started2 "&_
"FROM live_visitor_stats "&_
"WHERE (DATEPART(mm, started) = DATEPART(mm, { fn NOW() }))"&_
"ORDER BY started desc"
It works fine and gives me all records in the table for the current month.
I want to take those records and filter them for just today's date.
rs.filter = "started2 = 08/15/2006"
And this works fine...
BUT
When I try this
rs.filter = "started2 = "&Date()
It returns zero records. Can anyone tell me why?