Overview
Syntax | DAY(Serial_number,Format) | Returns the day of a date. The returned value is an integer ranging from 1 to 31. |
Parameter | Serial_number | Represents the date of the day you are trying to find. The Serial_number parameter can also be of the serial number type. For example, January 1, 1998 is stored as the serial number 35796 in the 1900 date system. ![]() The function allows the parameter to be empty. That is to say, the function can be DAY(). When the parameter is empty, the function returns the year of the day of the date corresponding to the current system server time. |
Notes
The function supports two parameters for extracted data. The first parameter is of the data or text type and the second is of the text type by default. The parameters can be empty.
The parameter can be of the date or text type by default for real-time data.
The second parameter can be of the yyyy-MM-dd format.
Example
Formula | Result | Note |
---|---|---|
DAY() | 23 | The corresponding system server time is 2020-10-23 15:36:25. |
DAY("2000/1/1") | 1 | The format 2000/1/1 is not supported for the real-time data. In this case, the formula needs to be written as DAY("2000-01-01"). |
DAY(35796) | 1 | The format is not supported for the real-time data. |
DAY("1997-04-20","yyyy-MM-dd") | 20 |