year()
Returns the Gregorian calendar year of a particular date.
year(date)
- date - the date from which to extrapolate the year
- Return type: Number
year('2020-05-12') returns 2020.
Input type | Return type | Logic |
Date | Number | If a Date is passed, the year corresponding to that date will be returned. |
Unsupported data types | Null | Unsupported data types return Null. |