Enform Plus Reference Manual

Clauses
Enform Plus Reference Manual422684-001
5-22
AS DATE Clause
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
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 (“ ”). The display-format can include date keywords, and other
characters such as blanks, commas, hyphens, or slashes. The date keywords are:
When you want a date printed, the date must be in internal format. For instructions on
how to convert a date to internal format, see the "
JULIAN-DATE Conversion Clause on
page 5-43 or the TIMESTAMP-DATE Clause on page 5-67. 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
The Enform Plus default date display-format, "M2/D2/Y4", might handle most of
the date formatting required. Change the default format by redefining the @DATE-
FORMAT option variable described under Option Variable Clauses on page 5-48.
date-in-internal-format AS DATE { * }
{ display-format }
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
Is an integer that specifies the number of characters (1-3) or numbers (2-4) to be
printed.