YEAR_9999

Use the YEAR_9999 script function to extract the year from a given date. The year is returned as a four-digit number.

Syntax

YEAR_9999 ([Date Format:]Date)

Parameters

  • WEEKDAY_XX
    Determines the year of a specified date

  • Date
    Date in YYMMDD or YYYYDDMM format
    Format: script literal or script variable
    Note: Specify the date format when you use a format other than YYMMDD or YYYYMMDD. Separate the date format and the date with a colon or semicolon. For more information, see Date, Time and Period Formats in Scripts.

Example

The following script returns the value 2000:

:SET &YEAR# = YEAR_9999("DD.MM.YY:31.12.00")

See also: