Obtains the year portion of date. Years from 1000 to 3000 inclusive are handled.
Year ( date )
|date||The date value from which you want the year|
Data type: Integer
Returns an integer whose value is a 4-digit year adapted from the year portion of date if it succeeds and 1900 if an error occurs.
If the year is two digits, then the century is set as follows. If the year is between 00 to 49, the first two digits are 20; if the year is between 50 and 99, the first two digits are 19.
If your data includes dates before 1950, such as birth dates, always specify a 4-digit year so that Year (and other functions, such as Sort) interpret the date as intended.
This expression returns 2005
Year( Date(‘2005-01-31’) )
Need more help with this?
Don’t hesitate to contact us here.