用下拉列表选择时间,查询一段时间内的所有记录,求助!!
<!--#include file="conn.asp" -->
<%
byear=request("byear")
bmonth=request("bmonth")
bday=request("bday")
kssj=byear&"-"&bmonth&"-"&bday '开始时间
/////
byear1=request("byear1")
bmonth1=request("bmonth1")
bday1=request("bday1")
jssj=byear1&"-"&bmonth1&"-"&bday '结束时间
%>
set rs=server.CreateObject("adodb.recordset")
sql="select * from AAA where time>='"&kssj&"' and time<='"&kssj&"'"
//time字段为日期函数(datetime),格式如2006-1-20 ,数据库为sql server
rs.open sql,conn,1,2
……
运行后程序后出现,字符型转化为日期型,时间越界 之类的提示。
各位,帮我查找下问题所在!!
谢谢!