asp教程 格式化時間函數
function formattime(testtime
dim n
n = year(testtime)
y = month(testtime)
r = day(testtime)
s = hour(testtime)
f = minute(testtime)
m = second(testtime)
if len(n) =
if len(y) =
if len(r) =
if len(s) =
if len(f) =
if len(m) =
nn=right(n
if style =
formattime = ""& n &"年"& y &"月"& r &"日"& s &"時"
elseif style =
formattime = r &"日 "& s & ":" & f & ":" & m
elseif style =
formattime = n &"年"& y &"月"& r &"日"
elseif style =
formattime = n & "
elseif style =
formattime = y &"
elseif style =
formattime = n &"年"& y &"月"& r &"日" & s &":"& f
elseif style =
formattime = n & y & r & s & f & m
elseif style =
formattime = n & "
elseif style =
formattime = n & "/" & y & "/" & r
end if
end function
From:http://tw.wingwit.com/Article/program/net/201311/14117.html