WHAT IS DAY, MONTH, AND YEAR FUNCTIONS IN EXCEL?
In Microsoft Excel, DAY,MONTH, and YEAR functions helps us to extract day value or month value or year value from a date. Day, Month, and Year functions requires one functional argument i.e. date value.
SYNTAX FOR DAY, MONTH, and YEAR FUNCTIONS
serial_number is a date and if we enter non integer value i.e. text then these functions return #VALUE! error
(check out the below video to learn more about Day, Month, and Year functions in Microsoft Excel)
EXAMPLES OF USAGE DAY, MONTH, YEAR FUNCTIONS IN MICROSOFT EXCEL
Practice the below examples, and play with different values to get more hands on experience on these functions.
|1||Enter 03/28/2020 value in cell A1 and then in cell A2 type the formula in formula section||=DAY(A1)||28|
|2||Enter 03/28/2020 value in cell A1 and then in cell A3 type the formula in formula section||=MONTH(A1)||3|
|3||Enter 03/28/2020 value in cell A1 and then in cell A4 type the formula in formula section||=YEAR(A1)||2020|
|4||Enter ‘A’ in cell A1 value then then try to practice like the above 3 rows||— Above formula’s–||#VALUE!|
TIPS & TRICKS:
- If we have a situation that we need to get day value change automatically if system date changes, then we can write function like this =day(today()) . We can write the similar way for month and year functions also like =month(today()) , and =year(today()) to get the month and year value dynamically. [Refer the following article to learn about Today function – http://msofficeguru.in/microsoft-excel/excel-how-to-use-today-and-now-function/]
- Day, Month, and Year functions are more helpful , not only extracting the values even we can use these functions for calculations [ sample practice file: https://app.box.com/s/9oty5fnkgtu1y508ehk1hadrmie94fww]
(check out my other articles and videos to play with the functions and how to use more efficiently.)
- How to work with DATE function in Microsoft Excel : http://msofficeguru.in/microsoft-excel/excel-date-function-in-microsoft-excel/
- How to work with DATEDIF function in Microsoft Excel : http://msofficeguru.in/microsoft-excel/excel-datedif-function-in-microsoft-excel/