VALID_DATE

Use the VALID_DATE script function to verify if a particular date is valid.

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

Syntax

VALID_DATE ([Date Format:]Date)

Parameters

  • VALID_DATE
    Checks whether the date is valid
  • Date

Return codes

  • Y
    The date is valid
  • N
    The date is not valid

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: