Date, Date$ Functions |
Syntax
Date
Return Value
Date returns a Variant of subtype Date; Date$ returns a String data type.
Description
Returns the current system date.
Rules at a Glance
They don't come any easier than this!
Programming Tips and Gotchas
Although Date returns a Variant, you can assign the return value of Date to a variable declared as a Date data type.
To return both the current date and time in one variable, use the Now function.
You can set the system date by using the Date statement.
See Also
- Date Statement, IsDate Function, Now Function
Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.