VB获取时间并格式化输出
Private Sub Timer1_Timer()
Dim strD() As String
Dim str1, str2, str3, str4 As String
strD = Split(Now, " ")
str1 = Format(Now, "yyyy年mm月dd日")
str3 = Format(Now, "hh:mm:ss")
str2 = strD(1)
str4 = strD(2)
Me.Label1.Caption = " " & str1 & " " & str2 & " " & str4 & " " & str3
End Sub