|
'############################################################### '函数作用:将"hh:mm:ss"格式的时分秒数转换成秒数 '############################################################### Public Function tom (str1 As String) As Single Dim f1 As Integer, f2 As Integer Dim tom1 As Single, tom2 As Single Tom1 = 0 tom2 = 0 Str1 = Trim (str1) f1 = InStr (1, str1, ":") f2 = InStr(f1 + 1, str1, ":") tom1 = Val(str1) * 3600 tom2 = Val(Mid(str1, f1 + 1, f2 ‐1)) * 60 + Val(Mid(str1, f2 + 1)) tom = tom1 + tom2 End Function |
|
|