日期查询格式(字符)识别问题
Select Case cmbproject.Text
Case "生日"
priv_project = "birthdate"
End Select
sql = "select client.* from client where client." & "" & priv_project & " like '%" & txtcondition.Text & "%' order by client.idclient"
我用这个查询来查询纪录,但是当priv_project 为日期型的字段时,不识别“-”这个字符,比如说我要查2003-07-17日的记录,我输入2、0、3、1、7、2003、17都可以查出来,但是输入2003-07-17就查不出来了,请问这是什么原因?