asp的代码,之前是好的,今天提示“类型不匹配: 'cdate' ” 代码:
if sYear="" or isnull(sYear) then sYear=trim(year(date))
if sMonth="" or isnull(sMonth) then sMonth=trim(month(date)-1)
if sMonth=12 then
CountMonthDay= DateDiff("d", cdate(sYear&"-"&sMonth&"-1"), cdate((sYear+1)&"-1-1"))'计算本月天数
else
CountMonthDay= DateDiff("d", cdate(sYear&"-"&sMonth&"-1"), cdate(sYear&"-"&(sMonth+1)&"-1"))'计算本月天数 //-->提示出错就是这一段代码,不知咋弄!
end if
if cdate(sYear & "-" & sMonth & "-1")>=cdate(year(date) & "-" & month(date) & "-1") then HX_GoBack "统计月份不能大于当前月份!",""
'if not WS_S.HX_Isnum(Did) then Did = cint(LOGdepartment)