Excel date functions: DATE, TODAY, YEAR, MONTH and DAY
Excel stores a date as a number: the count of days since 1 January 1900. That is why you can subtract dates. DATE builds a date from a year, month and day, and YEAR, MONTH and DAY take one apart.
Which function does what?
| Formula | Result |
|---|---|
=DATE(2026,11,14) | 14 November 2026 |
=YEAR(A2) | the year, e.g. 2026 |
=MONTH(A2) | the month, 1 to 12 |
=DAY(A2) | the day of the month |
=TODAY() | today's date, updated every day |
How do you calculate days between dates?
Subtract them: =B2-A2. If the result shows as a date, change the cell format to Number.
How do you group by month?
Add a helper column with the first day of the month:
=DATE(YEAR(A2),MONTH(A2),1)
Or use a pivot table, which can group dates by month and year on its own.
Why doesn't my date work in formulas?
It is probably text, usually from a CSV export. Text dates sit on the left of the cell. =ISNUMBER(A2) returns FALSE for them. Fix them with Data, Text to Columns, or with DATE and the text functions when the format is unusual.
Common mistake
=DATE(2026,13,1) doesn't give an error. Excel rolls over to January 2027. That is handy for "next month" formulas, but it hides typos.
Practise DATE Practise YEAR, MONTH, DAY Practise TODAY
Updated November 2026.