Purpose
Returns today's date in the format requested.
Syntax
►►─┬─ TODAY ──┬─ ( date-format ) ─────────────────────────────────────────────►◄ └─ TODAYX ─┘
Parameters
Invokes the today function. TODAYX returns a date that contains the century portion of the year.
Specifies the output date format. Date-format can be:
Date-format can be:
Example 1
In the following example, the today function is used to display today's date in the calendar format (where today is March 17, 1989):
Statement:
MOVE TODAY('C') TO WK-RESULT.
Returned value: 031789
Example 2
In this example, the today function is used to return today's date in the calendar format (where today is October 30, 1990). The returned date contains the century portion of the year:
Statement:
MOVE TODAYX('C') TO WK-RESULT.
Returned value: 10301990
|
Copyright © 2014 CA.
All rights reserved.
|
|