Cellgrids Cellgridsby LearnWithRinkesh
Home › Excel tutorials › Excel Date Functions: YEAR, MONTH, DAY and WEEKDAY

Excel Date Functions Explained: YEAR, MONTH, DAY, WEEKDAY and TEXT

By Rinkesh Shah · Business Analyst, 8 years in data · Updated 2026-10-31

▶ Video coming soon

A date in Excel is a number underneath. The date functions pull out the part you need, such as the month, so you can group and summarise data in reports.

YEAR, MONTH and DAY

If A2 has 15-Mar-2026:

Month name and day name with TEXT

=TEXT(A2, "mmm") returns Mar and =TEXT(A2, "mmmm") returns March. =TEXT(A2, "dddd") returns the day name, such as Sunday.

WEEKDAY

=WEEKDAY(A2, 2) returns 1 for Monday up to 7 for Sunday. The second argument 2 makes Monday the first day. To flag weekends: =IF(WEEKDAY(A2,2)>5, "Weekend", "Weekday").

Build a date from parts

=DATE(2026, 3, 15) creates a real date. It is useful when year, month and day sit in three separate columns.

Group sales by month

Add a helper column =TEXT(A2,"yyyy-mm") and use it in a pivot table or SUMIFS. The year-month format sorts correctly, which month names alone do not.

Common mistakes

Worked example

For 5-Oct-2026 in A2: =YEAR(A2) is 2026, =MONTH(A2) is 10, =DAY(A2) is 5, and =WEEKDAY(A2,2) is 1 (Monday is 1 with type 2). Build a date: =DATE(2026,10,5).

Common mistakes

Frequently asked questions

How do I get the month name?

=TEXT(A2,"mmmm").

How do I get the quarter?

=ROUNDUP(MONTH(A2)/3,0).

Why does my date show as a number?

Format the cell as Date.

Practice this online, free

Reading is only half of learning Excel. Cellgrids is a free place for online Excel practice: solve Excel formula exercises in a live spreadsheet, prepare for Excel interview questions, and work through business case studies built for data analytics and business analytics roles.

Practice these formulas: YEAR, MONTH, WEEKDAY.

Start Excel practice → Case studies