Time Function

Returns a Variant of subtype Date indicating the current system time.

Syntax

Time

Remarks

The following example uses the Time function to return the current system time:

Example 1:

Dim MyTime
MyTime = Time

Example 2:

Dim MyTime1, MyHour, MyMinute, MySecond
MyTime1 = Time
MyHour = Hour(MyTime1)     
MyMinute = Minute(MyTime1)  
MySecond = Second(MyTime1)  

'Output: Current Time
'Output: Hour from Current Time
'Output: Minute from Current Time
'Output: Second from Current Time