DATETIME$
The DATETIME$ function returns the current date and time. If no argument to the function is provided, the format of the date and time are 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 '||DateTime$
D$=datetime$(yyyy-mm-dd)
D2$=datetime$('mmmm dd, yyyy')
{Solution:
D$='2022-04-22 2:08:42 PM'
D2$='April 22, 2022 2:08:42 PM'
T$='Today is 4-22-2022 2:08:42 PM'}
See also: DATE$
Return to String Functions