select count([字段名]) from [tablename] where 时间字段 between 传递过来的时间1 and 传递过来的时间2
上面这个语句中也可以使用updatetim > '"&时间1&"' and updatetime<'"&时间2 &"'
时间格式例如 2007-01-01 00:00:01这种格式(具体格式根据你的数据库定义)
这样的做的好处是你可以利用ASP页面对好几个月或者是跨年度的查询相对来说会方便一些
使用时。用select语句向数据库搜寻数据。在剔除你不需要的部分。
rs.open "select * from xxs",conn,1,1
do while not rs.eof
if datapart(m,rs("ktime"))=datapart(m,now()) then
……………………显示所需内容………………
end if
rs.movenext
loop