t=request.form("year"
&"-"&request.form("month"
&"-"&request.form("day"
&" 00:00:00"
t1=request.form("year1"
&"-"&request.form("month1"
&"-"&request.form("day1"
&" 23:59:59"
if ……then
……
else
if request.form("year"
<>"" then
…………
else
t1=request("t1"
t=request("t"
end if
t=cdate(t)
t1=cdate(t1)
if t1<>"" then
sql0=sql0&" and ([date] between "&t&" and "&t1&" )"
end if