User guide

Formatting a Report
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–57
To print a date that is not stored in internal format, use the AS DATE clause to modify
the JULIAN-DATE clause:
OPEN order;
LIST ordernum,
JULIAN-DATE(oyear,omonth,oday) AS DATE *;
Report:
ORDERNUM
--------
21 01/10/78
25 01/23/78
... ...
Temporarily change the display format used for a date by using the AS DATE clause.
The following example changes the display format of the current date obtained by the
system variable @DATE:
OPEN order;
LIST ordernum,
salesman,
TITLE "ORDERS" SPACE 20,
@DATE AS DATE "MA DB2,Y4" SKIP 2;
Report:
ORDERS MAY 7,1982
ORDERNUM SALESMAN
-------- --------
21 205
25 212
30 222
... ...
Change the display format of a date value that is not stored in internal format by
including the JULIAN-DATE clause as follows:
OPEN order;
LIST ordernum,
JULIAN-DATE((1900 + oyear),omonth,oday)
AS DATE "DA - MA DB2,Y4",
HEADING " DAY AND DATE ORDERED";
Report:
ORDERNUM DAY AND DATE ORDERED
-------- ---------------------------
21 TUESDAY - JANUARY 10,1978
25 MONDAY - JANUARY 23,1978
30 MONDAY - FEBRUARY 6,1978
32 FRIDAY - MARCH 17,1978
... ...