Get the month, day and year from a date
While working in excel many times we need to extract month, day and year from a date in excel. Doing it manually will take lot of time. But don’t worry excel has best way for doing this. Whether you need just the month, day, or year from a date, Excel has simple functions that make this task a breeze. Let’s understand these functions and see how they can make your work easier!
1. How to Extract Month from Date in Excel
To extract the month from a date in Excel, you can use the MONTH
function. Here’s how:
- Select the Cell: Click on the cell where you want the month to appear.
- Enter the Formula: Type
=MONTH(A1)
, whereA1
is the cell containing the date you want to extract the month from. - Press Enter: Hit the Enter key, and the cell will display the month part of the date.
For example, if A1 contains 12/07/2025
, the formula =MONTH(A1)
will return 12
, which is December.
2. How to Extract Day from Date in Excel
To extract the day from a date in Excel, use the DAY
function. Here’s how:
- Select the Cell: Click on the cell where you want the day to appear.
- Enter the Formula: Type
=DAY(A1)
, whereA1
is the cell containing the date you want to extract the day from. - Press Enter: Hit the Enter key, and the cell will display the day part of the date.
For example, if A1 contains 12/07/2025
, the formula =DAY(A1)
will return 7
.
3. How to Extract Year from Date in Excel
To extract the year from a date in Excel, use the YEAR
function. Here’s how:
- Select the Cell: Click on the cell where you want the year to appear.
- Enter the Formula: Type
=YEAR(A1)
, whereA1
is the cell containing the date you want to extract the year from. - Press Enter: Hit the Enter key, and the cell will display the year part of the date.
For example, if A1 contains 12/07/2025
, the formula =YEAR(A1)
will return 2025
.
4.How to get last day of month in excel?
When working with dates in Excel, you might find yourself needing to extract just the day number of the last day of a given month. Here’s a simple way to do it using the EOMONTH
and DAY
functions.
Steps to Extract the Day Number of the Last Day of the Month:
- Select the Cell: Click on the cell where you want the day number to appear.
- Enter the Formula: Type
=DAY(EOMONTH(A1, 0))
, whereA1
is the cell containing the date. - Press Enter: Hit the Enter key, and the cell will display the day part of the last day of the month.
Example:
If A1
contains 12/07/2025
, using =DAY(EOMONTH(A1, 0))
will return 31
. This is the day number of the last day of July 2025
Summary of the above functions:
Excel’s date extraction functions are incredibly easy to use and can save you a lot of time. Whether you’re organizing data, creating reports, or simply trying to manage your schedule better, these functions can help you get the specific information you need quickly.
So, the next time you find yourself needing to extract just the month, day, or year from a date in Excel, remember these simple functions:
- Extract Month:
=MONTH(cell reference)
- Extract Day:
=DAY(cell reference)
- Extract Year:
=YEAR(cell reference)
- Extract last day of month:
=DAY(EOMONTH(cell reference, 0))
These functions will make your data management tasks smoother and more efficient.