日期问题,错在那里?
set_date=request( "set_year ")+ "- "+request( "set_month ")+ "- "+request( "set_day ")
sql= "select * from qiche where datediff( 'd ',plan_time,set_date)=0
set_year,set_month,set_day三个值都是通过下拉框取得,response.write set_date 显示日期格式也正常, 但就是sql语句多次调试均出错,不知为什么.注:plan_time为数据库表中的日期字段.请高手指教.谢谢.
------解决方案--------------------sql= "select * from qiche where datediff( 'd ',plan_time, ' " & set_date & " ')=0 "
------解决方案--------------------sql= "select * from qiche where (cint(datediff( 'd ', ' "&plan_time& " ', ' " & set_date & " '))=0) "
------解决方案--------------------sql= "select * from qiche where datediff( 'd ',plan_time,#2007-7-16#)=0
#2007-7-16# AC数据库 呵呵 要加这个#