Previous Topic: WeekdayNext Topic: Tailoring the CA OLQ Environment for Ease of Use


Yesterday

Returns yesterday's date in the format requested.

Syntax:

►►─┬─ YESTERDAY ──┬─ ('output-date-format') ──────────────────────────────────►◄
   └─ YESTERDAYX ─┘

Invocation names:

YESTERDAY
YESTERDAYX

Parameters:

YESTERDAY/YESTERDAYX

Invokes the yesterday function. YESTERDAYX returns a date that contains the century portion of the year.

'output-date-format'

Specifies the output date format. Output date can be expressed using:

Examples:

Example 1

In the example below, the yesterday function is used to display yesterday's date in the calendar format (where today is March 17, 1996):

Statement:
    compute sys-date = yesterday('c')
Returned value: 031696

Example 2

In the example below, the yesterdayx function is used to display yesterday's date in the calendar format (where today is March 17, 1996). The returned date contains the century portion of the year:

Statement:
    compute sys-date = yesterdayx('c')
Returned value: 03161996

Note: In the example above, SYS-DATE must contain the century portion of the year.