Excel YEAR, MONTH, and DAY Functions: Extract Parts of a Date

Use YEAR to get the year, MONTH to get the month, and DAY to get the day of the month in Excel. If A1 contains October 20, 2019 as a date value, the three functions return 2019, 10, and 20, respectively.

Extract the year, month, and day

Create the sample date in A1 with the first formula. Enter the remaining formulas in B1, C1, and D1 in order. MONTH returns a number from 1 to 12, and DAY returns 1 to 31. If the results look like dates, set the result cells to General or Number.

=DATE(2019,10,20)
=YEAR(A1)
=MONTH(A1)
=DAY(A1)

YEAR function reference

MONTH function reference

DAY function reference

DATE function reference

View a date as a serial number

Excel stores dates as serial numbers so it can calculate with them. In the 1900 date system, January 1, 1900 is 1 and December 31, 2019 is 43830.

Select a cell containing December 31, 2019 and press Ctrl+1 in Excel for Windows. In Format Cells, choose General and confirm. You should see 43830. Applying a date format again displays the same value as a date.

Microsoft’s guide to date formatting in Excel

Check dates stored as text and blank cells

The formula below checks whether the value in A2 is stored as a number. TRUE can mean a date serial or an ordinary number. If you get FALSE in a date column, check for text or a blank cell.

=ISNUMBER(A2)

Exclude blank cells and zero values when reporting date parts. Imported text such as 03/04/2026 may mean March 4 or April 3 depending on regional settings. When you know the intended year, month, and day, pass those numbers to DATE in that order. Your regional settings determine whether Excel separates arguments with commas or semicolons.

IS functions, including ISNUMBER

Convert dates stored as text

Check the workbook’s date system

Excel workbooks can use the 1900 or 1904 date system. The serial numbers for the same date differ by 1462 between the two systems. If a date shifts after transferring its raw serial number between workbooks, check the date system in both files.

Microsoft’s guide to the 1900 and 1904 date systems