今天寫的,放在這做個筆記
Function ch24(x)
ch24=FormatDateTime(x, 2) & “ “ & FormatDateTime(x, 4)
end function
function manyholiday(ofrom,oend)
allday=DateDiff(“D”,ofrom,oend)
for i = 1 to allday
x=DateAdd(“D”,i,ofrom)
if Weekday(x)=1 or Weekday(x)=7 then
manyholiday=manyholiday+1
end if
next
end function
MyTime = “2007/5/1 下午 03:19:15”
response.write ch24(MyTime)&”
“
response.write ch24(now())&”
“
response.write “========判斷假日=======”&”
“
response.write “區間內有”&manyholiday(MyTime,now())&”個假日”&”
“