ENFORM Reference Manual

AS DATE Clause
Clauses
058057 Tandem Computers Incorporated 5–23
AS DATE Clause The AS DATE clause allows you to specify the display format for printing a date. The
syntax of the AS DATE clause is:
date-in-internal-format
AS DATE
{}
*
display-format
date-in-internal-format
is the name of a variable or field that contains a date in internal format. The option
variable @DATE can be specified to give the current date in internal format.
*
specifies the default display format. The default display format specifies the date
in the form month/day/year. It is comparable to the display-format “M2/D2/Y2”
display-format
is the format for printing a date. Display-format must be specified within quotation
marks (“ ”). Display-format can include date keywords, and other characters such
as blanks, commas, hyphens, or slashes. The date keywords are:
M specifies a month
D specifies a day.
Y specifies a year.
A abbreviates or completely spells out the month or day. If n is specified with
the keyword A, only n letters are displayed.
B suppresses leading zeros.
O abbreviates or completely spells out the number corresponding to the day. If
n is specified with the keyword O, only n letters are displayed.
n
an integer that specifies the number of characters (1-3) or numbers (2-4) to be
printed.
When you want a date printed, the date must be in internal format. For instructions
on how to convert a date to internal format, refer to the JULIAN-DATE or
TIMESTAMP-DATE clause in this section. The date can be a target-item within a LIST
statement or any element that can be modified by an AS DATE clause within a print
list.
Default Display Format ENFORM’s default date display-format, “M2/D2/Y2”, might handle most of the date
formatting required. Change the default format by redefining the @DATE-FORMAT
option variable discussed in this section.