Date value giving the current system time
Sets or returns the current system time
TimeOfDay( ) = #9:05:13 AM#
sets the system time, and the code:
displays the current system time.
The TimeOfDay property returns the time in the time format defined by the system’s regional settings.
The TimeOfDay property includes an incorrect date, 01/01/0001, along with the time. It can be eliminated with the Format or FormatDateTime function as follows:
Format(TimeOfDay( ), "Long Time") FormatDateTime(TimeOfDay( ), DateFormat.LongTime)
When setting the TimeOfDay property, any date component is ignored.