Contents - Index


DATE$

 

The DATE$ function returns the current date. If no argument to the function is provided, the format of the date is controlled by the settings in the Regional Options Control Panel of your Windows Operating System. Alternatively, a format string can be provided for the date.  The format string should use mm (or mmmm) dd, and yy (or yyyy) for month day and year.  mm provides a numerical value for the month between 1 and 12 whereas mmmm provides the name of the month.  yy provides the last two digits of the year, whereas yyyy provides the full year.  Commas and space may be used provided that the argument is surrounded by single-quotes.

 

Examples:  

T$='Today is '||DATE$

D$=date$(yyyy-mm-dd)

D2$=date$('mmmm dd, yyyy')

 

{Solution:

D$='2022-04-22'

D2$='April 22, 2022'

T$='Today is 4-22-2022'}

 

 

See also: DATETIME$

               TIME$

               DATE

 

Return to String Functions