VBS里没有format()函数,简单的给你封个函数将就用吧
function formatdatetimes(datetime)
yy = year(datetime)
mn = month(datetime)
dd = day(datetime)
hh = hour(datetime)
mm = minute(datetime)
ss = second(datetime)
if cint(mn) <10 then mn = "0"&mn
if cint(dd) <10 then dd = "0"&dd
if cint(hh) <10 then hh = "0"&hh
if cint(mm) <10 then mm = "0"&mm
if cint(ss) <10 then ss = "0"&ss
formatdatetimes = yy &"-"& mn &"-"& dd &" "& hh &":"& mm & ":" & ss
end function
response.Write formatdatetimes("2009-1-20 1:2:9")
response.Write "
"
response.Write formatdatetimes(now)
%>
d=date()
Format(d,"YYYY-MM-DD HH:MM:SS")