VALID_DATE

Script Function: Checks if the date is valid

Syntax

VALID_DATE ([Date Format:]Date)

Syntax

Description/Format

Date


Return codes

"Y" - The date is valid
"N" - The date is invalid

Optionally, you may specify a particular Date Format. The default Date Formats to be used are "YYMMDD" or "YYYYMMDD". A colon or semicolon may be used as a separator between Date Format and Date.

Tip: Use the :ON_ERROR script statement to define action to take if the date is invalid. For more information, see Script Elements for Error Handling.

Example

The example checks if the year 2001 is a leap year. The result (N) is output in the activation report.

:SET &RET#=VALID_DATE("DD.MM.YYYY:29.02.2001")
:
PRINT &RET#

See also: