ASP中日期型数据变量的计算
SQL查询条件是要查日期比客户端传来的日期小三个月的。我用了DateAdd(m,-3,xf_time),但出错了,不知道怎么改。
<%
xf_time = request.Form( "xf_time ") '传来的格式为 "yyyy-mm-dd "
xf_timeme=DateAdd(m,-3,xf_time)
sql= "select * from Tablename where 字段1= ' " & host_sn & " ' and 字段2= ' " & smalllocation & " 'and 日期字段 < ' "&xf_timeme & " ' "
……
%>
------解决方案--------------------xf_timeme=DateAdd( "m ",-3,xf_time)