The YEAR function returns the current year value in YYYY format.
Category
Date / Time
Syntax
YEAR(date)
Parameter and Description
Parameter | Description |
---|---|
date | This parameter specifies a valid date in YYYYMMDD format. |
Example
Map the current year into target field CURRENT_YEAR. Assume that the date is 20021215.
CURRENT_YEAR = YEAR (date)
Returns the value of 2002 and maps the result to the target field.