YEAR_9999

Script Function: Extracts the year from a given date

Syntax

YEAR_9999 ([Date Format:]Date)

Syntax

Description/Format

Date Format

Format for the given Date

: or ;

Separator between the Date Format and the Date

Date

Specification of a date according to the Date Format

[Date Format:]Date

Format: script literal or script variable


Return code

Cipher of the year (4-figure)

The entry of Date Format is optional. If Date Format is not used, the date must be specified in the format "YYMMDD" or "YYYYMMDD". A colon or semicolon can be used as a separator between Date Format and Date.

Example

The example returns the value '2000' as the year of the specified date.

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

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts