<%
today=date
if weekday(today)=1 then today=DateAdd("d", -6, today)
if weekday(today)=2 then today=today
if weekday(today)=3 then today=DateAdd("d", -1, today)
if weekday(today)=4 then today=DateAdd("d", -2, today)
if weekday(today)=5 then today=DateAdd("d", -3, today)
if weekday(today)=6 then today=DateAdd("d", -4, today)
if weekday(today)=7 then today=DateAdd("d", -5, today)
if mid(strtoday1,1,2)=01 and mid(strtoday,1,2)=12 then
sql="SELECT count(*) as total from [birthday] where right(left(convert(char,client_birthday,21),10),5) between '01-01' and '"&strtoday1&"'"
sql1="select count(*) as total from [birthday] where right(left(convert(char,client_birthday,21),10),5) between '"&strtoday&"' and '12-31'"
set rs=conn.execute(sql)
set rs1=conn.execute(sql1)
response.write "共有"&rs("total")+rs1("total")&"人过生日"
else
sql="SELECT count(*) as total from [birthday] where right(left(convert(char,client_birthday,21),10),5) between '"&strtoday&"' and '"&strtoday1&"'"
set rs=conn.execute(sql)
response.write "共有"&rs("total")&"人过生日"
end if
Function Format_date(str)
Dim y, m, d, h, mi, s
Format_date = ""
If IsDate(str) = False Then Exit Function
y=year(str)
m=right("0"&month(str),2)
d=right("0"&day(str),2)
Format_date = y & "-" & m & "-" & d
End Function
%>