ACCESS:
"select * from 报表 where 日期 like #" & Format(CDate(txtMonth)) & "# "
---------------------------------------------
SQL SERVER:
"select * from 报表 where 日期 like '" & Format(CDate(txtMonth)) & "' "
"select * from 报表 where 日期 like #" & Format(CDate(txtMonth)) & "# "
---------------------------------------------
SQL SERVER:
"select * from 报表 where 日期 like '" & Format(CDate(txtMonth)) & "' "
*****************************************************************************
欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
"select * from 报表 where 日期 like #" & Format(CDate(txtMonth),"yyyy-MM-dd") & "# "
---------------------------------------------
SQL SERVER:
"select * from 报表 where 日期 like '" & Format(CDate(txtMonth)."yyyy-MM-dd") & "' "