Using DAY, MONTH, YEAR functions to extract date in Excel
Using DAY, MONTH, YEAR functions to extract date in Excel: To extract the Day, Month, and Year values from a specific date in Excel, you can use three processing functions: DAY, MONTH, and YEAR. These functions are simple, easy to use, and are often used in combination with other functions such as SUMIFS to calculate sales, debts under multiple conditions (including time conditions), used with IF function, VLOOKUP function, combined with a string, used in administration to determine the end date of the month for timekeeping, building attendance sheets, payroll sheets, applications in finding birth years when creating a student list … This article will guide you on how to use DAY, MONTH, YEAR functions.
1. DAY function
The DAY function is used in Excel to return the value as a day in an Excel cell. The day value is returned as an integer from 1 to 31.
Function syntax: =DAY(serial_number)
Where: serial_number: required argument, is the date, month, year value you want to extract the day
For example, we have a time table as shown below.
Note: Excel stores dates as a continuous serial number. By default, January 1, 1900, is 1 and September 17, 2012, is 41,169 because it is 41,169 days after January 1, 1900.
Thus:
- In cell A4, 41,169 corresponds to September 17, 2012
- In cell A7, 42,857 corresponds to May 2, 2017
- In cell A9, 43,274 corresponds to June 23, 2018
- In cell A10, 43,800 corresponds to December 1, 2019
To extract the day of the time column, apply the above function structure, we have the formula for cell B2 as follows:
=DAY(A2)
Copy the formula for the remaining cells in the Day column to get the result:
2. MONTH function
The MONTH function is used in Excel to return the value as a month in an Excel cell. The month value is returned as an integer from 1 to 12.
Function syntax: =MONTH(serial_number)
Where: serial_number: required argument, is the date, month, year value you want to extract the month
Still with the above example, to extract the month of the time column, we have the formula for cell C2 as follows:
=MONTH(A2)
Copy the formula for the remaining cells in the Month column to get the result:
2. YEAR function
The YEAR function is used in Excel to return the value as a year in an Excel cell. The year value is returned as an integer from 1900 to 9999.
Function syntax: =YEAR(serial_number)
Where: serial_number: required argument, is the date, month, year value you want to extract the year
Still with the above example, to extract the year of the time column, we have the formula for cell D2 as follows:
=YEAR(A2)
Copy the formula for the remaining cells in the Year column to get the result:
In conclusion, language learning is a valuable and rewarding endeavor that can bring numerous benefits, from enhancing communication skills to fostering cultural understanding and opening up new opportunities. While it may require effort and persistence, the benefits of language learning can last a lifetime and enrich both personal and professional experiences. Whether you are learning a new language for practical or personal reasons, it is important to approach it with an open mind, a positive attitude, and a willingness to engage with the language and its culture. With these qualities, anyone can become a successful language learner and enjoy the many benefits that come with it.