How to: |
The TODAY function retrieves the current date from the operating system in the format MM/DD/YY or MM/DD/YYYY. You can remove the default embedded slashes in the date using the EDIT function. The DATE function always returns a date that is current. Therefore, if you are running an application late at night, you may want to use TODAY.
You can also retrieve the date in the format MM/DD/YY or MM/DD/YYYY using the Dialogue Manager system variable &DATE. You can retrieve the date without the slashes using the system variables &YMD, &MDY, and &DMY. The system variable &DATEfmt retrieves the date in a specified format.
TODAY(output_format)
where:
Alphanumeric, at least A8
Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.
The following rules apply:
Tip: TODAY is not actually a legacy date function. It is included here for your convenience. The preferred way to obtain the current date is by using the system variables &YYMD and related variables.
TODAY retrieves the current date and stores it in a column with the format A10.
TODAY('A10')
iWay Software |