Time (function)

<< Click to Display Table of Contents >>

Time (function)

Time [()]

Returns the current system time in the format HH:MM:SS.

The separator can be changed using the Regional Settings applet in the Windows Control Panel.

See also: Date, DateSerial, DateValue, Hour, Minute, Now, Second, TimeSerial, TimeValue

Example:

Sub Main

 T1 = Time

 MsgBox T1

 MsgBox "Hours: " & Hour(T1)

 MsgBox "Minutes: " & Minute(T1)

 MsgBox "Seconds: " & Second(T1)

End Sub