Purpose
Returns TRUE or FALSE to indicate whether a date is valid for the date type.
Syntax
►►──┬─ GOODDATE ──┬─ ( date, date-format ) ───────────────────────────────────►◄ └─ GOODDATEX ─┘
Parameters
Invokes the good date function. Use GOODDATEX to test dates that contain the century portion of the year.
A numeric value that specifies the input date.
Date can be:
Note: If you are specifying a Julian date, you must specify a leading zero in the string that the process passes for Julian dates. The leading zero does not apply to non-Julian dates.
Specifies the date format for which GOODDATE or GOODDATEX tests date.
Date-format can be a string enclosed in quotation marks or a user-defined variable data field containing one of the following:
Example
In this example, GOODDATE tests whether the date type in the user-defined variable, MYDATE, is of date format calendar:
IF (GOODDATE(MYDATE,'C')) THEN
CALL DATECONV.
ELSE
CALL DATERROR.
|
Copyright © 2014 CA.
All rights reserved.
|
|