Second 函数
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