Date and Time Quick Reference
The following table lists methods for date and time information.
Statement | Purpose | Reference |
---|---|---|
Date |
Converts an expression to the data type variant of type date. |
|
Date = expression |
Sets the computer date. |
|
DateSerial |
Converts a number to a date. |
|
DateValue |
Converts a string to a date. |
|
Day |
Returns the day component of a date and time value. |
|
Hour |
Returns the hour of day component of a date and time value. |
|
Minute |
Returns the minute component of a date and time value. |
|
Month |
Returns the month component of a date and time value. |
|
Now |
Returns the current date and time. |
|
Second |
Returns the second component of a date and time value. |
|
Time |
Returns the current time. |
|
Time = expression |
Sets the current time. |
|
Timer |
Returns the number of seconds since midnight. |
|
TimeSerial |
Returns the time for a specific hour, minute, and second. |
|
TimeValue |
Converts a string to time. |
|
Weekday |
Returns the day of the week for the specified date and time value. |
|
Year |
Returns the year component of a date and time value. |