Category: FUNCTION | Updated: 2026-11-22
How to Use the DAY Function in Google Sheets | Extract Only the Day from a Date
How to Use the DAY Function in Google Sheets
The DAY function extracts only the day of the month (an integer from 1 to 31) from a date value. It is useful for assigning billing cycles based on monthly cutoff dates (such as the 15th or 20th) or checking for the start and end of a month.
Syntax
=DAY(date)
- date: The date value or cell containing the date from which to extract the day.
Examples
Here are examples of extracting the day from dates in Column A and using it for conditional branching.
| Row | A (Date) | B (Formula) | Result | Description |
|---|---|---|---|---|
| 1 | 2026/11/22 | =DAY(A1) |
22 | Extracts 22 from the date |
| 2 | 2026/11/05 | =DAY(A2) |
5 | Single-digit days return as 5 |
| 3 | 2026/11/22 | =IF(DAY(A3)<=20, "Current Month", "Next Month") |
Next Month | Automatically assigns billing cycle using a 20th-of-the-month cutoff |
| 4 | 2026/02/10 | =DAY(EOMONTH(A4, 0)) |
28 | Gets the last day (number of days) in February 2026 |
Common Errors and Tips
- Enclose literal dates in double quotes
- Writing
=DAY(2026/11/22)evaluates as division, so always wrap literal dates in double quotation marks like=DAY("2026/11/22").
- Writing
- When
#VALUE!errors occur- Referencing a cell containing a nonexistent calendar date string—such as February 30 or April 31—causes a
#VALUE!error.
- Referencing a cell containing a nonexistent calendar date string—such as February 30 or April 31—causes a
- Referencing a blank cell returns
30- Because Google Sheets’ base date is December 30, 1899, referencing an empty cell returns
30. If your table has blank rows, handle them with=IF(A1="", "", DAY(A1)).
- Because Google Sheets’ base date is December 30, 1899, referencing an empty cell returns
Frequently Asked Questions
Q. Can I get the day of the week using the DAY function?
A. No, DAY only returns the day of the month (1–31). To get the day of the week, use the WEEKDAY function or "=TEXT(A1, "ddd")".
Q. Can I find the last day of the month (whether it has 30 or 31 days)?
A. Yes. Combine DAY with EOMONTH as "=DAY(EOMONTH(A1, 0))" to return the total number of days in that month (28, 29, 30, or 31).