|
<%
sub checkdate(one,two)
a=year(one)
b=year(two)
if a=b then
a = month(one)
b = month(two)
if a=b then
a = day(one)
b = day(two)
if a=b then
response.Write("等于")
elseif a>b then
response.Write("大于")
else
response.Write("小于")
end if
elseif a>b then
response.Write("大于")
else
response.Write("小于")
end if
elseif a>b then
response.Write("大于")
else
response.Write("小于")
end if
end sub
set rs = server.CreateObject("adodb.recordset")
sql = "select * from userinfo"
rs.open sql,conn,1,1
n=rs("time")
m=date()
checkdate n,m
%>
这样写应该很好理解吧.... |
|