YEAR / MONTH / DAY / WEEKDAY / NETWORKDAYS
Pull a single piece out of a date, name which day of the week it falls on, or count the actual working days between two dates.
YEAR, MONTH, and DAY are the simplest way to pull one component out of a date for grouping or display, "what year was this order placed" being the most common shape. WEEKDAY's return_type argument is easy to get wrong silently, since both numbering schemes it supports are valid-looking integers; picking the one that matches whatever Monday-start or Sunday-start convention the rest of the sheet already uses matters more than it looks like it should. NETWORKDAYS automatically excludes Saturdays and Sundays from its count, which is exactly what separates it from a plain end_date-start_date subtraction that would count every single day regardless of the weekend.
Syntax
| Argument | Description |
|---|---|
| date | YEAR/MONTH/DAY/WEEKDAY: Required. A real date value or a cell holding one. |
| return_type | WEEKDAY: Optional. 1 (default) numbers Sunday=1 through Saturday=7; 2 numbers Monday=1 through Sunday=7. |
| start_date, end_date | NETWORKDAYS: Required. The first and last day of the span, inclusive. |
| holidays | NETWORKDAYS: Optional. A range of extra dates to also exclude, beyond weekends. |
A real example: working days on a project deadline
A project span where only actual working days should count toward the deadline, weekends excluded automatically:
A plain subtraction of the two dates would include every Saturday and Sunday in between; NETWORKDAYS skips them on its own, and a holidays range can be added as a third argument to exclude specific public holidays too.
Worked examples
| A | |
|---|---|
| 1 | Order date |
| 2 | 2026-03-14 |
| A | |
|---|---|
| 1 | Date |
| 2 | 2026-03-14 |
(March 14, 2026 is a Saturday, so Monday-start numbering returns 6)
| A | B | |
|---|---|---|
| 1 | Start | End |
| 2 | 2026-03-02 | 2026-03-13 |
Common mistakes
- Subtracting end_date-start_date when weekends shouldn't count toward a deadline. That plain subtraction includes every day; NETWORKDAYS is the one that skips weekends.
- Assuming WEEKDAY always numbers Sunday as 1. Without checking return_type, a Monday-start sheet can silently be off by a day in every calculation downstream.
- Forgetting the holidays argument when a real public holiday falls inside the span: without it, NETWORKDAYS only ever excludes weekends, nothing else.
Related functions
Try it yourself
A free, graded practice exercise using this exact function: instant feedback, no signup required.
Practice date-part functions →