I am trying to get some data from SQL database with this string:
strDate = CDate(mydate)
sql = "select NoRcpt from RcptMain where Dates LIKE '%@" & strDate & "%' order by NoRcpt DESC"
However nothing returns.
NoRcpt is Integer column (used as Identity)
Dates is Datetime column
There is data in that table, and number returned should be 1 but i am receving nothing so I guess the problem is in Dates LIKE '%@" & strDate & "%'.
P.S. In string strDate looks like "14.11.2010" in database in Dates column that data is 14.11.2010. 0:00:00 that's why i am using LIKE. I could format database input to ignore hh:mm:ss but I will use that eventualy.