"select * from 报表 where 日期 like 'format(cdate(txtmonth)) ' " 我想在报表中搜索到txtmonth框中输入的日期实现按月查找或者按年查找,例如txtmonth框中2006年12月,但是上面的语句怎么没有办法显示啊?报表中日期的格式是2006-12-25
发表于:2007-01-15 15:19:441楼 得分:0
access: "select * from 报表 where 日期 like # " & format(cdate(txtmonth)) & "# " --------------------------------------------- sql server: "select * from 报表 where 日期 like ' " & format(cdate(txtmonth)) & " ' "
发表于:2007-01-15 15:25:012楼 得分:0
select * from 报表 where month(日期) =month( 'format(cdate(txtmonth)) ' ) and year(日期) =year( 'format(cdate(txtmonth)) ' ) "