如何统计用户年龄段
Access数据库
表名:kh
字段:
id
sr (时间日期格式)生日
qy (文本)签约状态
userid (数字)用户ID
Function nltj(x,d)
set rstj=server.createobject("adodb.recordset")
sqltj="select count(sr) as nltj from kh where qy='已签约' and ((date()-sr) between "&x&" and "&d&")"
rstj.open sqltj,conn,1,1
nltj=rstj("nltj")
rstj.close
set rstj=nothing
End Function