Extracted Data
1. Overview
Syntax | YEAR(Serial_number,Format) | Returns the year in the date. The year is returned as an integer ranging from 1900 to 9999. |
Parameter | Serial_number | The Serial_number parameter can be serial numbers in the 1900 date system. For example, 35796 represents 1998-01-01. |
2. Notes
The function allows the parameter to be empty. That is to say, the function can be YEAR(). When the parameter is empty, the function returns the year of the date corresponding to the current system server time.
The function supports the date or text type parameter.
The second parameter can be of the yyyy-MM-dd format.
3. Example
Formula | Result | Note |
YEAR() | 2020 | The corresponding system server time is 2020-10-23 15:36:25. |
YEAR("2000/1/1") | 2000 | |
YEAR(35796) | 1998 | |
YEAR("1997-04-20","yyyy-MM-dd") | 1997 |
Real-Time Data
1. Overview
Syntax | YEAR(Serial_number) | Returns the year in the date. The year is returned as an integer ranging from 1900 to 9999. |
Parameter | Serial_number | Represents the date entered. The parameter can only be of the text or date type. |
2. Notes
The function allows the parameter to be empty. That is to say, the function can be YEAR(). When the parameter is empty, the function returns the year of the date corresponding to the current system server time.
The parameter can be of the default date or text type.
The second parameter can be of the yyyy-MM-dd format.
3. Example
Formula | Result | Note |
YEAR() | 2020 | The corresponding system server time is 2020-10-23 15:36:25. |
YEAR("2000-01-01") | 2000 |