Syntax
STRING = DATE$(OPT strFormat as STRING)
Description
Returns the current date as a string
Parameters
strFormat - Optional date formatting string. Default format is DD-MM-YYYY
Formatting specifiers:
Specifier
|
Result
|
d
|
Day of month as digits with no leading zero for single-digit days.
|
dd
|
Day of month as digits with leading zero for single-digit days.
|
ddd
|
Day of week as a three-letter abbreviation..
|
dddd
|
Day of week as its full name.
|
M
|
Month as digits with no leading zero for single-digit months.
|
MM
|
Month as digits with leading zero for single-digit months.
|
MMM
|
Month as a three-letter abbreviation.
|
MMMM
|
Month as its full name.
|
y
|
Year as last two digits, but with no leading zero for years less than 10.
|
yy
|
Year as last two digits, but with leading zero for years less than 10.
|
yyyy
|
Year represented by full four digits.
|
|
|
Return value
The current date
Remarks
To enclose text in the output string use single quote marks in the format string.
Example usage
PRINT DATE$
PRINT DATE$("ddd',' MMM dd yy")
|