DAY
DAG in Dutch Excel
Returns the day of the month, a number from 1 to 31, from a date.
Last updated: 13 October 2026
| Row | A | B | C |
|---|---|---|---|
| 1 | Entry | Posting date | Day |
| 2 | 25-1301 | 29 Dec 2025 | 2929=DAY(B2)=DAY(B2) |
| 3 | 25-1302 | 31 Dec 2025 | |
| 4 | 25-1303 | 2 Jan 2026 | |
| 5 | 25-1304 | 15 Jan 2026 |
Swipe sideways to see all columns
Result: 29
=DAY(B2)
=DAY(B2)
What DAY does and when to use it
What it does: it returns the day of the month, from 1 to 31, of a date (a serial number in Excel), for example the posting day of a journal entry.
When to use it: for cut-off tests around a period end, checks for postings on unusual days, and recurring items that must fall on the same day each month. Together with MONTH and YEAR it takes a date apart.
How Excel evaluates it
Excel stores a date as a serial number, a count of days. DAY converts that number to a calendar date and returns the day part. An empty cell counts as serial number 0, and DAY of that is 0, without an error.
Watch out: A date that arrives as text is converted with the regional setting: 02-01-2026 is 2 January in a Dutch setting and 1 February in a US setting, and 30-12-2025 cannot be converted at all in a US setting (#VALUE!).
Terms used on this page: serial number, cell
DAY(serial_number)
DAY(serial_number)
| Argument | Type | Meaning |
|---|---|---|
serial_number | Required | The date to take the day from. |
Return value:The day of the month as a whole number from 1 to 31
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Read the posting day of a journal entry
In the XAF auditfile of Veldhuis Installatie BV every entry has a posting date. For your journal entry testing you want the day of the month on which each entry was posted, so you can see how many were booked in the last days of a period.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Entry | Posting date | Day | |
| 2 | 25-1301 | 29 Dec 2025 | 2929=DAY(B2)=DAY(B2) | |
| 3 | 25-1302 | 31 Dec 2025 | ||
| 4 | 25-1303 | 2 Jan 2026 | ||
| 5 | 25-1304 | 15 Jan 2026 | ||
| 6 |
Swipe sideways to see all columns
Formula in C2
=DAY(B2)
=DAY(B2)
Result: 2929
Step by step
- DAY has one argument, serial_number. Here it is
B2, which holds 29 December 2025. Excel stores this date as the serial number 46020. - Excel converts 46020 to the calendar date 29 December 2025 and keeps only the day part.
- The result is 29. The month and the year play no part in it.
- Copied down,
C3returns 31,C4returns 2 andC5returns 15. Entry25-1303was posted on 2 January, in a different month from the other two, and DAY does not show that.
Watch out: A day number alone cannot tell 2 January from 2 December. When the month matters, as in a cut-off test, combine DAY with MONTH or YEAR, or test the whole date.
More on this example: why it works
Why it works
A date is a day count under the surface, and DAY reads only the day-of-month part of the calendar date that count stands for. It does not shift or round anything, so the number is exactly what the date shows.
Intermediate
Show the value day of bank lines, with a message for missing dates
For the cut-off test on the bank statement you want the day of the month of each value date. One line in the extract has no value date yet. Without a guard, DAY would turn that empty cell into a 0 and the line would look like a valid but strange date, so the sheet should say that the date is missing.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Line | Value date | Amount | Day | |
| 2 | B-0211 | 30 Dec 2025 | €4,200.00€ 4.200,00 | 3030=IF(B2 = "", "No value date", DAY(B2))=IF(B2 = ""; "No value date"; DAY(B2)) | |
| 3 | B-0212 | 31 Dec 2025 | €1,850.25€ 1.850,25 | ||
| 4 | B-0213 | €960.00€ 960,00 | |||
| 5 | B-0214 | 2 Jan 2026 | €12,400.00€ 12.400,00 | ||
| 6 | B-0215 | 5 Jan 2026 | €730.50€ 730,50 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=IF(B2 = "","No value date", DAY(B2))
=IF(B2 = "";"No value date"; DAY(B2))
Result: 3030
Step by step
- IF evaluates its test first:
B2= "".B2holds the date 30 December 2025, which is not empty, so the test is FALSE and IF takes its third argument. - DAY(B2) reads the serial number 46021, converts it to 30 December 2025 and returns the day part: 30.
- Copied down,
D3returns 31. InD4,B4is empty, so the testB4= "" is TRUE and IF returns the text No value date. DAY is never evaluated for that row. - Without the IF,
D4would show 0: an empty cell counts as serial number 0, and the day part of that is 0. Nothing would warn you that the date is missing.D5andD6return 2 and 5.
Watch out: A cell with a space instead of a date is not equal to empty text, so it falls through to DAY and gives #VALUE!. That error is at least visible; check such cells in the extract.
More on this example: why it works, 1 variation
Why it works
The comparison with empty text is TRUE for an empty cell, so the guard catches exactly the case that DAY handles silently. IF evaluates only the branch it needs, so the guarded cell never reaches DAY.
Variations
=IF(ISBLANK(B2),"No value date", DAY(B2))
=IF(ISBLANK(B2);"No value date"; DAY(B2))
ISBLANK only treats a truly empty cell as missing. A cell with empty text from a pasted formula would reach DAY and give #VALUE!, so choose it when the extract is clean.
Advanced
Flag month-end postings that fall on a weekend
In your journal entry testing, manual entries posted on the last day of a month that falls on a Saturday or Sunday deserve a closer look: nobody is at the office to approve them. You need one formula that recognizes a month-end date, whatever the month length, and checks the day of the week.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Entry | Posting date | Test | |
| 2 | 25-0610 | 31 Aug 2025 | Weekend month end=IF(AND(DAY(B2 + 1) = 1, WEEKDAY(B2, 2) > 5), "Weekend month end", "OK")=IF(AND(DAY(B2 + 1) = 1; WEEKDAY(B2; 2) > 5); "Weekend month end"; "OK") | |
| 3 | 25-0611 | 30 Sep 2025 | ||
| 4 | 25-0612 | 18 Oct 2025 | ||
| 5 | 25-0613 | 30 Nov 2025 | ||
| 6 | 25-0614 | 31 May 2025 | ||
| 7 |
Swipe sideways to see all columns
Formula in C2
=IF(AND(DAY(B2 + 1) = 1,WEEKDAY(B2, 2) > 5), "Weekend month end", "OK")
=IF(AND(DAY(B2 + 1) = 1;WEEKDAY(B2; 2) > 5); "Weekend month end"; "OK")
Result: Weekend month end
Step by step
- Excel evaluates the arguments of AND from the inside out. In DAY(B2 + 1), B2 + 1 is 31 August 2025 plus one day: 1 September 2025. DAY of that is 1, so the comparison = 1 is TRUE. B2 is the last day of its month.
- WEEKDAY(B2, 2) numbers the days with Monday as 1. 31 August 2025 is a Sunday, so the function returns 7, and 7 > 5 is TRUE.
- AND receives TRUE and TRUE and returns TRUE. IF then returns its second argument: Weekend month end.
- Copied down:
C3(30 September, a Tuesday) is a month end but WEEKDAY returns 2, so the result is OK.C4(18 October, a Saturday) is a weekend butB4+ 1 is 19 October, DAY 19, so it is no month end: OK. C5(30 November, a Sunday) returns Weekend month end, and so doesC6(31 May, a Saturday). Three of the five entries need follow-up.
Watch out: Testing DAY(B2) = 31 for the month end silently misses 30 September and 30 November: the formula would flag only the two entries on the 31st and call the 30 November entry OK, with no error.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
The day after any last day of a month is the 1st, so DAY(date + 1) = 1 recognizes month ends of 28, 29, 30 and 31 days alike. Return type 2 of WEEKDAY puts Saturday and Sunday at 6 and 7, so a single comparison finds the weekend. AND needs both conditions before the entry is flagged.
More to watch out for
- The test works on whole dates. If an extract holds posting dates with a time,
B2+ 1 still lands on the next day, but the date inB2must be a real date and not text.
Variations
=IF(AND(B2 = EOMONTH(B2,0), WEEKDAY(B2, 2) > 5), "Weekend month end", "OK")
=IF(AND(B2 = EOMONTH(B2;0); WEEKDAY(B2; 2) > 5); "Weekend month end"; "OK")
Same result with EOMONTH instead of DAY. It reads more directly, but fails when the date carries a time part, where DAY(B2 + 1) = 1 still works.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
Take the posting day from mixed real and text dates
A bank interface delivers posting dates partly as real dates and partly as text in the layout dd-mm-yyyy, depending on the file. You need the day of the month for every row, and the result must not change when a colleague opens the sheet with a different regional setting. DAY on the text cells would give #VALUE! or a different day depending on the setting.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Entry | Posting date as received | Amount | Day | |
| 2 | 25-0911 | 30-12-2025 | €2,300.00€ 2.300,00 | 3030=LET( raw, B2, posted, IF(ISNUMBER(raw), raw, DATE(RIGHT(raw, 4), MID(raw, 4, 2), LEFT(raw, 2))), DAY(posted) )=LET( raw; B2; posted; IF(ISNUMBER(raw); raw; DATE(RIGHT(raw; 4); MID(raw; 4; 2); LEFT(raw; 2))); DAY(posted) ) | |
| 3 | 25-0912 | 29 Dec 2025 | €845.50€ 845,50 | ||
| 4 | 25-0913 | 02-01-2026 | €15,100.00€ 15.100,00 | ||
| 5 | 25-0914 | 31 Dec 2025 | €620.00€ 620,00 | ||
| 6 | 25-0915 | 3 Jan 2026 | €3,875.75€ 3.875,75 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=LET( raw,B2, posted, IF(ISNUMBER(raw), raw, DATE(RIGHT(raw, 4), MID(raw, 4, 2), LEFT(raw, 2))), DAY(posted) )
=LET( raw;B2; posted; IF(ISNUMBER(raw); raw; DATE(RIGHT(raw; 4); MID(raw; 4; 2); LEFT(raw; 2))); DAY(posted) )
Result: 3030
Step by step
- LET reads its arguments in pairs: a name, then a value. raw becomes
B2, which holds the text30-12-2025. - posted is an IF. ISNUMBER(raw) asks whether the cell holds a real date, which is a number. It holds text, so the answer is FALSE and IF takes its third argument.
- The text is cut by position, so no regional setting is involved. RIGHT(raw, 4) is 2025, MID(raw, 4, 2) starts at character 4 and takes two characters: 12, and LEFT(raw, 2) is 30.
- DATE(2025, 12, 30) builds the real date 30 December 2025, so posted holds the serial number 46021. The last argument of LET is DAY(posted): 30.
- Copied down,
D3holds a real date, ISNUMBER is TRUE, posted is the cell itself and DAY returns 29.D4holds the text02-01-2026, which the cut reads as 2 January 2026, so the result is 2.
Watch out: The mirror-image mistake: the cut assumes dd-mm-yyyy. A text date in the layout mm-dd-yyyy is read with day and month swapped, so 02-01-2026 meant as 1 February gives day 2 instead of 1, with no error. Confirm the layout with the source before you rely on the column.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
The formula separates the two kinds of cell before DAY sees them, and it never asks Excel to guess a text layout. The cut depends on the characters only, so it gives the same answer in every regional setting.
Do not use this construction when the whole column is text in one layout: convert it once with Text to Columns or Power Query and use a bare DAY on real dates. DATEVALUE is shorter, but it reads the text with the regional setting, which is exactly what this formula avoids.
More to watch out for
- A text date with a time, such as 30-12-2025 17:45, makes RIGHT(raw, 4) return 7:45, and DATE fails with #VALUE!. That error is visible, but the formula needs another cut for such a layout.
Variations
=DAY(B2)
=DAY(B2)
The bare form for a column of real dates, which is what the column should become after conversion.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| #VALUE! on a date from an export | DAY returns #VALUE! on a date that came from an export. The cell holds text, and the regional setting cannot read its layout. | Convert the text into real dates once (Text to Columns, or DATE with LEFT, MID and RIGHT as in the Master example). A real date is right-aligned by default; text is left-aligned. |
| 0 for an empty date cell | DAY of an empty cell returns 0, so a missing date looks like a valid day number and ends up in your counts. | Test for empty first: IF(B2="", "No date", DAY(B2)), as the Intermediate example does. |
| Month ends on the 30th are missed | You test DAY(B2)=31 to find month-end dates and miss every month that ends on the 30th, 29th or 28th. | Test DAY(B2+1)=1: the day after a month-end date is always the 1st. Or compare with EOMONTH(B2, 0). |