@Year (Formula Language)

Extracts and returns the year from the specified time-date value.

Syntax

@Year( time-date )

Parameters

time-date

Time-date or time-date list. The time-date of the year you want.

Return value

year

Number or number list. The year of time-date. @Year returns the year relative to the time zone in which the date was generated. Returns -1 if the time-date provided contains only a time value and not a date.

Usage

If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

Examples

  1. This example returns 1995.
    @Year([9/29/95])
  2. This example returns 1995 and 2008.
    @Year([9/29/95] : [9/29/08]