I copied the code but it contains syntax error and I found out it wasn't evaluating.
Using MsgBox Gives the exact string above.
I've also tried Cdate and Format function but didn't work too. I've spent 4 hours on this problem. Sigh ....
Btw, My Sql database only contains a Date field, NOT datetime.
Main Topics
Browse All Topics





by: angelIIIPosted on 2006-05-03 at 06:53:42ID: 16596173
assuming SQL Server:
rs.Open "Select * from Testing Where Date = convert(datetime, '2006-05-03', 120) "
better even, to avoid problems when time portion is stored in the field:
rs.Open "Select * from Testing Where [Date] >= convert(datetime, '2006-05-03', 120) AND [Date] < dateadd(day, 1, convert(datetime, '2006-05-03', 120)) "