Second()
函數返回0
到59
之間的數字,表示指定時間戳的秒鐘數值。
語法
Second(time)
示例
添加一個模組,並添加以下示例代碼 -
Private Sub Constant_demo_Click()
msgbox("Line 1: " & Second("3:13:25 PM"))
msgbox("Line 2: " & Second("23:13:45"))
msgbox("Line 3: " & Second("2:20 PM"))
End Sub
執行上面示例代碼,得到以下結果 -
Line 1: 25
Line 2: 45
Line 3: 0