Syntax
Today()
Remarks
Returns a serial number that represents the current date according to the computer's system date. Unlike Now(), which returns a serial number in which the digits after the decimal point represent the time as a fraction of a day, Today() returns strictly whole numbers. For more information about serial numbers, see DateSerial().
Example
This example displays a message box stating the number of days until the new year. The number of days is calculated by subtracting the serial number for the current date from the serial number for January 1 of the following year.
yr = Year(Today()) rightNow = Today() jan1 = DateSerial(yr + 1, 1, 1) MsgBox "Days until the new year:" + Str$(jan1-rightNow)
See Also
Date$(), DateSerial(), DateValue(), Day(), Month(), Now(), Time$(), TimeSerial(), TimeValue(), Year()