Simple and detailed guide on how to use the DAY function in Excel with easy-to-understand examples

The DAY function in Excel is a commonly used tool for analyzing date data: day, month, year. If you are unfamiliar with how to use the DAY function, don't overlook the detailed instructions in this article!

0
111

The DAY function in Excel is a basic function, but many people still don’t know how to use it. When you understand how to implement the DAY function, all operations in Excel become much simpler, faster, and more professional. Let’s explore how to use it right away!

What is the DAY function? The formula of the DAY function in Excel

The DAY function in Excel is a date function that falls under the date and time function group. In fact, this function can be combined with many different function groups to create suitable calculation formulas for your work needs.

To display the function content accurately in the cell reference of the worksheet, you enter =DAY (Serial_number). Where:

  • Serial_number is the date value
  • The value returned by the DAY function is between 1 and 31.

How to use the DAY function in Excel

To easily imagine how to use the DAY function on the spreadsheet, let’s explore some examples from basic to advanced below!

1. Use the DAY function to extract the day

  • Step 1: First, you open the Excel worksheet that you want to use the function. Then, at the cell where you want to display the result content (C3), you enter =DAY (B3) 

  • Step 2: Finally, you press the Enter key to display the result.

Note: You can change the date format on your computer by going to the Home tab, selecting the Number group, and then selecting the General format.

2. Use the DAY function combined with the DATEDIF function

Step 1: To start the operation, first, you open the existing Excel spreadsheet. In the spreadsheet, you enter the function =DATEDIF(B3,C3,”D”) into the cell where you want to display the result (C7). Where:

  • B3 is the start time
  • C3 is the end time
  • “D” is the symbol of the day you want to take from the date, month, year value.

You can change “D” to “M” (if you count by month) or “Y” (when you count by year). At this time, the number displayed in the calculated cell is the number of months/years you want.

Step 2: Finally, to end the operation, you press Enter to display the result on the screen.

3. Use the DAY function in Excel to find the date

Find the first day of the month

In addition to the usual uses, the DAY function is also used to find the first day of the month in Excel. The specific formula is: =B3-DAY(B3)+1. Where, B3 is the content referring to the cell containing the date data.

Find the exact date after n years

Suppose you need to find the exact result of the day, month, year with a year difference of “Time (years)” calculated from the “Original data”. The formula used is as follows: =DATE(YEAR(B3)+C3,MONTH(B3),DAY(B3))

Where:

  • The YEAR function is used to determine the desired year (equal to the year value at cell B3 plus the number of years at cell C3).
  • The MONTH function is used to determine the desired month (equal to the month value at cell B3).
  • The DAY function is used to determine the desired day (equal to the day value at cell B3).

Combine the results of the YEAR, MONTH, and DAY functions, you will get the final result in the corresponding date format.

Common errors when using the DAY function in Excel

During the use of the DAY function, you will inevitably encounter and make some mistakes. Here are 2 common errors, their causes, and how to fix them.

Error #NAME!

  • Cause: Your function has a value error, incorrect syntax (letters or characters) that makes the worksheet unable to recognize the function.
  • How to fix: You need to check and correct the calculation formula according to the required syntax.

Error #VALUE

  • Cause: You will encounter this error when entering the wrong regulations regarding the date, month, year
  • How to fix: Similar to the previous error, you should check the content format and re-enter it correctly.

Conclusion

You will easily understand the DAY function in Excel if you are proficient in syntax, formulas, and their usage. If you have any questions that need answering, please leave a comment below and don’t forget to share if you find the information FPT Shop shares useful! In addition, you can also refer to some suitable laptops for office workers to perform tasks and operations on Word, Excel,… effectively.

Frequently asked questions

The ‘DAY’ function is a built-in Excel formula that extracts the day of the month from a given date. It’s particularly useful when you need to isolate the day component from a date for further calculations or analysis.

The syntax for the ‘DAY’ function is =DAY(serial_number), where ‘serial_number’ refers to the date from which you want to extract the day. Simply enter the date as the argument within the parentheses, and Excel will return the day value.

Sure, let’s say you have the date ‘2024/06/09’ in cell A1. To extract the day, you would use the formula =DAY(A1), and the result would be ‘9’, as it represents the day of the month.

In such cases, you can use the ‘DAY’ function along with the ‘DATE’ function to create a valid date for extraction. For instance, if you have the year ‘2024’ in cell B1 and the day ‘9’ in cell B2, you can use the formula =DAY(DATE(B1,1,B2)) to get the result ‘9’.

One important thing to keep in mind is that Excel uses the 1900 date system, so dates should be entered in this format: year, month, day. Also, ensure that the date you’re referencing is either entered directly into the formula or is in a cell formatted as a date to get accurate results.