DAY function
Returns the day of the month (1 to 31) from a date.
Available in All versions of Excel (Windows and Mac), Excel for Microsoft 365, Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
DAY(serial_number)| Argument | What it means | |
|---|---|---|
serial_number | Required | A date: a cell containing a date, a formula that returns one, or a date serial number. |
Returns: A whole number from 1 to 31.
How DAY works
DAY pulls the day-of-month number out of a date. Given 15 March 2026 it returns 15. On its own that is simple, but it becomes useful in rules that depend on where in the month something happens: invoices raised after the 25th go to next month's run, a rent reminder fires on the 1st, or a report should show only the first half of the month.
DAY is one of three sister functions — YEAR, MONTH and DAY — that split a date into parts. Use them together with DATE to rebuild modified dates, for example DATE(YEAR(A2),MONTH(A2),1) for the first of the month. The argument must be a real date; text that only looks like a date may give #VALUE! or an unexpected result.
Examples
1Get the day number from a date
| A | B | |
|---|---|---|
| 1 | Order date | Day |
| 2 | 2026-03-15 | 15 |
Result: 15
DAY returns 15 because the order was placed on the 15th of the month.
2Route invoices to this month's or next month's payment run
| A | B | |
|---|---|---|
| 1 | Invoice date | Payment run |
| 2 | 2026-11-27 | Next run |
Result: Next run
The invoice is dated the 27th, which is on or after the 25th cut-off, so it is held for the next payment run.
3Number of days in a month
| A | B | |
|---|---|---|
| 1 | Any date in the month | Days in month |
| 2 | 2028-02-10 | 29 |
Result: 29
EOMONTH returns the last day of the month (29 Feb 2028, a leap year) and DAY reads its day number, giving the month's length.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The argument is text that cannot be read as a date. | Convert the text with DATEVALUE first. |
Unexpected 0 | The referenced cell is empty — Excel treats it as serial 0 ('0 Jan 1900'). | Wrap in IF(A2="","",DAY(A2)). |
Tips
- To display the day as text such as "Sun" or "Sunday" use
TEXT(A2,"ddd")orTEXT(A2,"dddd")— DAY only gives the number. - DAY works on date-time values too: the time part is simply ignored.
Questions
How do I get the day name instead of the number?
Use =TEXT(A2,"dddd") for the full name or WEEKDAY for a 1–7 number. DAY returns only the day of the month.
Why does DAY return 0?
The source cell is blank. Excel treats an empty cell as serial 0, whose day part is 0.
Google Sheets
DAY also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
DAY in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | DEN |
| Danish | DAG |
| Dutch | DAG |
| Finnish | PÄIVÄ |
| French | JOUR |
| German | TAG |
| Hungarian | NAP |
| Italian | GIORNO |
| Norwegian (Bokmål) | DAG |
| Polish | DZIEŃ |
| Portuguese (Brazil) | DIA |
| Portuguese (Portugal) | DIA |
| Russian | ДЕНЬ |
| Spanish | DIA |
| Swedish | DAG |
| Turkish | GÜN |