Automation Engine Script Guide > Ordered by Function > Date and Time > VALID_DATE

VALID_DATE

Script Function: Checks if the date is valid

Syntax

VALID_DATE(Date)

Syntax

Description/Format

Date

Indication of a date in the format "YYMMDD" or "YYYYMMDD".

Format: script literal or script variable

It is also possible to specify a different date format. Do so by entering the required date format, then enter a separator (: or ;) and afterwards the date. Indicating a date format is optional.


Return codes

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

Comments

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.

If return code "N" is supply, the script elements for error handling may help to analyze the occurred error.

Example

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

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

 

See also:

Script element Description

VALID_CALE

Checks whether or not a date is included in a calendar keyword

VALID_TIME

Checks if a time is valid

Script Elements - Date and Time

Date, Time and Period Formats

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function