asp中日期查询出现问题

[复制链接]
查看11 | 回复1 | 2009-5-9 17:39:40 | 显示全部楼层 |阅读模式
查询时可以判断日期的格式(2009-02-24),但是不能实现按日期正确查询
初学者请教(急)
""and zrq=""then

if isvaliddate(qrq)=0 then
Response.Write ""
Response.End

else

rs1=rs1&"and 起日期>='"&isvaliddate(qrq)&"'"

end if
end if
if qrq=""and zrq"" then

ifisvaliddate(zrq)=0 then

Response.Write ""

Response.End

else

rs1=rs1&"and 止日期""and zrq"" then

ifisvaliddate(qrq)=0 or isvaliddate(zrq)=0then

Response.Write ""
Response.End
else if qrq>=zrq then
Response.Write ""
Response.End

else
rs1=rs1&"and 起日期>="&qrq
rs1=rs1&"and 止日期"" Then

rs1=rs1&"and 项目承担人 like '%"&teacher&"%'"
end if
if level"" then

rs1=rs1&"and 级别='"&level&"'"
end if
if xmly"" then
rs1=rs1&"and 任务来源='"&xmly&"'"
end if
end if

rs.open rs1,conn,3,3

回复

使用道具 举报

千问 | 2009-5-9 17:39:40 | 显示全部楼层
虽然我看不懂,但我觉得你可以去其他大型网站也发个信息,拓宽搜索面...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行