============================================
格式化時間(顯示)
參數
============================================
Function FormatTime(s_Time
Dim y
FormatTime = ""
If IsDate(s_Time) = False Then Exit Function
y = cstr(year(s_Time))
m = cstr(month(s_Time))
If len(m) =
d = cstr(day(s_Time))
If len(d) =
h = cstr(hour(s_Time))
If len(h) =
mi = cstr(minute(s_Time))
If len(mi) =
s = cstr(second(s_Time))
If len(s) =
Select Case n_Flag
Case
yyyy
FormatTime = y & "
Case
yyyy
FormatTime = y & "
Case
hh:mm:ss
FormatTime = h & ":" & mi & ":" & s
Case
yyyy年mm月dd日
FormatTime = y & "年" & m & "月" & d & "日"
Case
yyyymmdd
FormatTime = y & m & d
case
yyyymmddhhmmss
FormatTime= y & m & d & h & mi & s
End Select
End Function
%>
From:http://tw.wingwit.com/Article/program/net/201311/12559.html