Excel: Date Function (VBA only)
In Excel, the Date function returns the current system date.
The syntax for the Date function is:
Date()
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
For example:
Date() would return a value such as '22/11/2003'
VBA Code
The Date function can only be used in VBA code. For example:
Dim LDate As String
LDate = Date
In this example, the variable called LDate would now contain the current system date.