一段时间内有多少周六周日,你照着改一下
function getWeekDayNum(stime,etime)
days = datediff("d",cdate(stime),cdate(etime))
tmpWeekDayNum = days\7
tmp = cint(days mod 7)
tmp1 = cint(weekday(cdate(etime)))
response.Write tmp&"--"&tmp1
if tmp+1>tmp1 then
SaturdayNum = tmpWeekDayNum+1
SunDayNum = tmpWeekDayNum+1
elseif tmp+1=tmp1 then
SaturdayNum = tmpWeekDayNum+1
SunDayNum = tmpWeekDayNum
else
SaturdayNum = tmpWeekDayNum
SunDayNum = tmpWeekDayNum
end if
getWeekDayNum = SaturdayNum+SunDayNum
response.Write "周六:"&SaturdayNum&"天 周日"&SunDayNum&"天"
end function
call getWeekDayNum("2006-10-21","2006-10-24")