In this blog, we would unlock one of the most-used excel functions viz. DAY formula in Excel. We would cover the following – purpose and objective of the DAY function, its syntax and arguments along with simple examples of DAY function in excel.
Objective of DAY Function in Excel
The excel =DAY function is used to get the day value from the date specified as an input argument. The output of this formula is nothing but a day value ranging from 1 to 31.
Syntax and Arguments of DAY Formula
This formula has only one argument which is serial_number.
- serial_number – In this argument, you need to specify the serial number of the date or the date (in text format).
The input argument (serial number) can be either entered manually or given as a cell reference. Similarly, you can either enter the date manually or give it as a cell reference.
Note that if you enter the date manually, then must be within double quotes, like =DAY(“15/01/2021“). Likewise, if you give a reference to the cell, then the date in the reference cell must be in a text format (and not in date format)
Simple Examples to Understand Excel DAY Function
Let us consider some examples to understand the DAY formula.
1# Example with Serial Number as Input Argument
In the below image you can see that the date serial number 44269 represents the date 14/02/2021. Therefore, the output of the =DAY(44269) is 14.
Similar is the case with the date serial number 44270 (representing 15/02/2021).
You can also give a reference to another cell containing the date serial number as shown in the image below:
2# Example with Date (Stored as Text) as Input Argument
Another way is to give the input argument as the date, within double quotes as shown in the image below:
You may also give reference to another cell that contains a date. Importantly, the date specified in the reference cell must be stored in text format rather than in an actual excel date format.
3# Example to Get Day Using Output of Another Formula
You can get the day value using the output of some other date-related formulas. In that case, embed the other formula as an input argument of the DAY formula, as shown below:
The above formula would return or get the day value of the today’s or current date. Today’s date is 17/01/2021, hence the result of DAY function is 17.
Thanks You 🙂