-
Notifications
You must be signed in to change notification settings - Fork 7
BASIC DATE and TIME Functions
Curtis F Kaylor edited this page Aug 24, 2023
·
3 revisions
TYPE: plusBASIC System function
FORMAT: DATE$
Action: Returns a string containing the current date.
- The returned string is in the format "YYYYMMDD" (four digit year, two digit month, and two digit day of month).
Examples of DATE$ function:
PRINT DATE$
Prints the current date.
PRINT RIGHT$(DATE$,6_
Prints the current date in "YYMMDD" format.
TYPE: plusBASIC System function
FORMAT: TIME$
Action: Returns a string containing the current time.
- The returned string is in the format "HHmmss" (two digit hour in the range 0 - 23, two digit minute, and two digit second).
Examples of DATE$ function:
PRINT TIME$
Prints the current time.
PRINT LEFT$(DATE$,4)
Prints the current year and month in "YYMM" format.
TYPE: plusBASIC System function
FORMAT: DATETIME$
Action: Returns a string containing the current date and time.
- The returned string is in the format "YYYYMMDDHHmmss".
- DATETIME$ is equivalent to DATE$+TIME$
Example of DATETIME$ function:
PRINT DATETIME$
Prints the current date and time.