<< Click to Display Table of Contents >> Now (function) |
Now[()]
Returns the current system time (date and time).
The Now function returns a result of the type Variant consisting of date and time. The positions to the left of the decimal point define the date, the positions to its right the time.
See also: Date, Day, Hour, Minute, Month, Second, Time, Weekday, Year
Example:
Sub Main
T1 = Now ' Now = current date + time
MsgBox T1
MsgBox "Day: " & Day(T1)
MsgBox "Month: " & Month(T1)
MsgBox "Year: " & Year(T1)
MsgBox "Hours: " & Hour(T1)
MsgBox "Minutes: " & Minute(T1)
MsgBox "Seconds: " & Second(T1)
End Sub