DAY Function in ONLYOFFICE Spreadsheet Editor: Syntax, Examples and Date Checks
Extract the day-of-month number (1 through 31) from a date, not the weekday or elapsed days.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
DAY function in ONLYOFFICE Spreadsheet Editor
Quick answer
Extract the day-of-month number (1 through 31) from a date, not the weekday or elapsed days. In the English ONLYOFFICE DAY reference, the exact published signature is =DAY(serial_number). All displayed outputs below are independently calculated expectations, not results observed in an installed ONLYOFFICE editor.
Purpose and correct mental model
DAY returns the day of the month, not the day of the week. Its official ONLYOFFICE help describes an integer range from 1 to 31. For example, the constructed leap-day date 2024-02-29 has an independently expected DAY value of 29, while the next calendar day 2024-03-01 has day-of-month 1.
DAY helps with invoice due-day checks, monthly reporting rules and date-part validation. For weekdays, use WEEKDAY; for elapsed days between two dates, use DAYS. Those are separate functions with different argument meanings.
Exact official syntax, argument order and defaults
=DAY(serial_number)
| Argument | Required? | Definition and boundaries | Example |
|---|---|---|---|
serial_number |
Required | Date value/serial number whose day of month is needed. | D2 |
The arguments above are required; the current official reference documents no optional parameters or default argument values for this function. In these formulas, parameter labels such as serial_number describe argument positions; you type a cell reference or numeric expression instead. English examples use commas. All values in the shared exercise are intended to represent unambiguous Gregorian calendar dates. DAY vendor reference.
Version, edition, regional and date-system notes
- ONLYOFFICE Docs / browser editor: vendor help confirms the documented function name and arguments, not reproducibility on every deployed server version. The Docs release history records version 9.4.0 (May 20, 2026), but does not establish that this function first appeared then.
- ONLYOFFICE Desktop Editors: desktop release history is separately maintained; Desktop 9.4.0 is dated May 19, 2026. Do not infer identical support, same error strings, or the introduction version from the shared product branding.
- Android, iOS and other integrations: this investigation does not establish native function support or evaluation parity for a specific app build. Open the function picker in the target editor and perform a local test.
- Formula language and locale: the Advanced Settings documentation describes separate Formula Language and Region controls, including date-display and separator settings. Formulas here use English names,
=and commas. If the installed interface expects localized names or a different list separator, adapt and independently validate entry; date cells should be formatted explicitly rather than assumed to display the same across regions. - 1900 vs. 1904 date system: the same Advanced Settings page documents an optional 1904 date system. It affects date serial calculations and imported workbooks. The tables below compare calendar dates, not hard-coded serial integers. Record the selected date system before comparing workbooks from another spreadsheet product.
Document checks: 2026-10-11 UTC. These are documentation findings, not test logs from a native ONLYOFFICE session.
Reproducible practice sheet (shared by all four date guides)
Create a clean spreadsheet. Type the headings Year, Month, Day, Constructed date, YEAR result, MONTH result, DAY result into A1:G1. Enter the following numbers in A2:C9 (without quotation marks); never paste ambiguous date strings such as 03/04/2026 as input data. Place =DATE(A2,B2,C2) in D2 and fill down to D9. Set D2:D9 to a date format in which the calendar year, month and day are unambiguous—for example yyyy-mm-dd when available. If you see a large integer instead, the date display format probably needs adjusting.
| Row | A — Year | B — Month | C — Day | Independently expected displayed calendar date in D | E — YEAR | F — MONTH | G — DAY |
|---|---|---|---|---|---|---|---|
| 2 | 2024 | 2 | 29 | 2024-02-29 | 2024 | 2 | 29 |
| 3 | 2025 | 1 | 1 | 2025-01-01 | 2025 | 1 | 1 |
| 4 | 2026 | 10 | 11 | 2026-10-11 | 2026 | 10 | 11 |
| 5 | 2000 | 12 | 31 | 2000-12-31 | 2000 | 12 | 31 |
| 6 | 2030 | 3 | 15 | 2030-03-15 | 2030 | 3 | 15 |
| 7 | 2020 | 6 | 1 | 2020-06-01 | 2020 | 6 | 1 |
| 8 | 2010 | 7 | 4 | 2010-07-04 | 2010 | 7 | 4 |
| 9 | 2026 | 12 | 31 | 2026-12-31 | 2026 | 12 | 31 |
For E2, enter =YEAR(D2); for F2, enter =MONTH(D2); for G2, enter =DAY(D2). Fill all three formulas down through row 9. The shared example-dates.csv in this batch contains the input numbers and independently expected values; the CSV is a test fixture, not an execution transcript. These expected outputs were checked using Python’s Gregorian datetime.date types, which do not simulate ONLYOFFICE’s formula engine or serial-date edge cases.
To reproduce the test without filling, enter each formula from the table below directly into its indicated output cell. Use the worksheet’s actual values, not screenshots or an imagined workbook.
Worked DAY examples
Use the shared D2:D9 dates. Enter =DAY(D2) in G2 and fill through G9. The expected day numbers below come from independent Gregorian date component extraction.
| Output cell | Enter this formula | Independently expected result | Reason |
|---|---|---|---|
| G2 | =DAY(D2) |
29 | Leap-day test |
| G3 | =DAY(D3) |
1 | Year boundary |
| G4 | =DAY(D4) |
11 | Calendar component |
| G5 | =DAY(D5) |
31 | Year boundary |
| G6 | =DAY(D6) |
15 | Calendar component |
| G7 | =DAY(D7) |
1 | Calendar component |
| G8 | =DAY(D8) |
4 | Calendar component |
| G9 | =DAY(D9) |
31 | Year boundary |
Advanced example 1: determine whether a record falls in the first 15 days
With D6 = 2030-03-15, enter =IF(DAY(D6)<=15,"First half","Second half") in H6. Expected: First half. This is a simple policy rule, not a calculation of half the days in every calendar month; months have different lengths.
Advanced example 2: check leap-day behaviour explicitly
With D2 = 2024-02-29, enter =DAY(D2+1) in H2. Expected: 1, because the following calendar date is March 1, 2024. The expected value was calculated using Python’s Gregorian date arithmetic. The use of +1 on spreadsheet date serials is a conventional interoperability expectation; it has not been natively verified in ONLYOFFICE in this run.
Advanced example 3: preserve a monthly reminder day, safely described
With D4 = 2026-10-11, =DAY(D4) is expected to return 11, useful for marking the eleventh day of each month in a reminder table. However, creating the same day in a month with fewer days (for example, a reminder on the 31st moved to February) requires a separate documented business rule: skip, clamp to month-end, or roll forward. DAY alone cannot decide that policy.
Diagnostic example
If a user wants to know whether 2026-10-11 is a Sunday, DAY(D4) is expected to return 11, not a weekday label. Select the dedicated WEEKDAY function and its documented numbering scheme instead; conflating the two functions can break schedules.
Function-specific pitfalls
- Month length varies: a returned 31 cannot occur on a valid April or June calendar date. DAY itself is an extractor, not a validity checker for arbitrary text input.
- Day versus weekday: DAY is a number 1–31; WEEKDAY has separately documented numbering conventions.
- Day versus elapsed days: DAYS takes two dates and returns a difference; DAY takes one date and extracts its component.
- Zero or negative serial inputs: the official article does not enumerate all conversions or error codes. Test boundary values and the workbook date system on a real installed editor.
- Fractional time components: if you feed date-time serials, document the target application’s observed extraction, not an assumed floor/coercion rule.
Troubleshooting and boundaries
- The date displays as an integer: ensure the output cell uses a date format. The date serial system is a separate setting from the on-screen formatting. Do not replace an integer with a text date and assume calculations will still work.
- A formula shows as text: enter it with a leading
=, avoid quoted formula strings, and confirm the cell is not forced to text formatting. Use the Insert Function picker to check the installed function name. - A copied formula gives unexpected values: compare each reference with the practice table; for example,
D4is the constructed 2026-10-11 date, whileA4is just the year 2026. A YEAR/MONTH/DAY function called on A4 would be interpreting a serial number, not reading the digits “2026” as a year. - Dates imported from another locale:
04/05/2026is ambiguous without regional context. PreferDATE(2026,5,4)or separately entered numeric parts for a reproducible check. - 1900/1904 mismatches: before trusting dates in a migrated Excel file, verify the workbook’s date-system settings. A function name matching in two apps does not prove equality of serial-number handling.
- Invalid or blank inputs: the short official help pages do not document a complete error-code and type-coercion matrix. Test blanks, negative serials, strings, the year-1900 boundary and localized dates in the target installation; do not claim a specific
#VALUE!/#NUM!result without observing it. - Unsupported edition or version: check the real product version, Formula Language, platform and installed function picker, then reduce the example to one literal
DATE(...)and one extraction. A web documentation page is not a compatibility matrix.
Deliberately unresolved edge cases: the consequences of a day beyond the number of days in a month, month 0 or 13, years before 1900, decimal arguments, and non-Gregorian display calendars are not guaranteed by the short ONLYOFFICE references. The worked examples stay within documented argument ranges and valid Gregorian dates. Do not promote Excel’s normalization behaviour to a verified ONLYOFFICE rule.
Compatibility: documented facts versus untested assumptions
Microsoft Excel documents corresponding DATE, YEAR, MONTH and DAY formulas, and Microsoft explains the use of sequential date serials. These are analogous English function names, not proof of matching outcomes for boundary dates, formula-language translations, cross-version imports, or 1900/1904 settings. Excel’s official date-function reference is a useful contrast; ONLYOFFICE Advanced Settings documents the date-system option inside this editor.
In particular, changing a date’s display format is not equivalent to changing the underlying date value. Do not use textual dates for cross-software validation. Export a small workbook and record the versions and chosen date systems in both products if interoperability is important. No comparative application execution was done during this research pass.
Related guides and checked external references
- DATE — official ONLYOFFICE reference (checked 2026-10-11 UTC).
- YEAR — official ONLYOFFICE reference (checked 2026-10-11 UTC).
- MONTH — official ONLYOFFICE reference (checked 2026-10-11 UTC).
- WEEKDAY — official ONLYOFFICE reference (checked 2026-10-11 UTC).
- DAYS — official ONLYOFFICE reference (checked 2026-10-11 UTC).
Official reference and verification
- ONLYOFFICE Spreadsheet Editor — function documentation
- WEEKDAY
- DAYS
- ONLYOFFICE Insert Functions index
- Docs release history
- Desktop 9.4.0 is dated May 19, 2026
- Advanced Settings documentation
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in ONLYOFFICE Spreadsheet Editor.
- No genuine ONLYOFFICE Spreadsheet Editor screenshots are included; this guide does not use mock application images.