Public Function getTimeInMS() As Long
Dim d As Date
d = Now()
Dim t As Single
t = Timer
getTimeInMS = _
( _
(Hour(d) * 10000000#) _
+ (Minute(d) * 100000#) _
+ (Second(d) * 1000#) _
+ fFloor((t - Int(t)) * 1000) _
)
End Function
' Get date in milliseconds
Public Function getDateInMS() As Double
Dim d As Date
d = Now()
Dim t As Single
t = Timer
getDateInMS = _
( _
( _
(Year(d) * 10000000000000#) _
+ (Month(d) * 100000000000#) _
+ (Day(d) * 1000000000#) _
+ (Hour(d) * 10000000#) _
+ (Minute(d) * 100000#) _
+ (Second(d) * 1000#) _
+ fFloor((t - Int(t)) * 1000) _
) _
)
End Function
' Get date in minutes
Public Function getDateInMin() As String
Dim d As Date
d = Now()
Dim t As Single
t = Timer
getDateInMin = _
( _
( _
(Year(d) * 100000000#) _
+ (Month(d) * 1000000#) _
+ (Day(d) * 10000#) _
+ (Hour(d) * 100#) _
+ (Minute(d) * 1#) _
) _
)
End Function
No comments:
Post a Comment