Contact

DAYSINMONTH in Collabora Office: Find the Length of the Date’s Month

Date & Time Intermediate Collabora Office Calc

Use Collabora DAYSINMONTH for month-length checks, leap-February controls and explicit daily allocation denominators.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =DAYSINMONTH(DATE(2024;2;15)) has independently expected result 29. The function returns the number of days in the month containing the supplied date.

Syntax and required date

=DAYSINMONTH(Date)

Date is one valid date in the target month and year. It is the only argument. The dedicated Collabora help uses a February 1968 date and documents a result of 29.

The argument is a date, not the month number two or a year number such as 2024. A bare number can be interpreted as a spreadsheet date serial and therefore refer to an unintended month. Use DATE to construct an explicit input when the source is a year and month.

The returned value is a count, typically 28, 29, 30 or 31 for the modern Gregorian calendar examples here. Format it as a number rather than a date.

Example 1: compare month lengths

Enter these formulas in A2:A5: =DATE(2024;1;15), =DATE(2024;2;15), =DATE(2024;4;15), =DATE(2025;2;15). In B2 use =DAYSINMONTH(A2) and fill down.

Independent expected counts are 31, 29, 30, 28. January and April differ because their month lengths differ. February 2024 and February 2025 differ because only 2024 is a leap year.

The particular day within a valid month does not change its length. February 1 and February 29 in 2024 both target 29. This differs from counting the days remaining after a particular date.

Example 2: derive days remaining explicitly

With =DATE(2024;2;15) in A2, =DAYSINMONTH(A2)-DAY(A2) has independent target 14, the number of days after February 15 through the end of the month.

If the reporting convention includes February 15 itself, add one and obtain 15. DAYSINMONTH supplies the full month length; it does not select an inclusive or exclusive remaining-days convention for you.

Label the result “Days after this date” or “Days including this date” so the boundary choice survives later edits.

Advanced application: build a monthly denominator table

Put year 2024 in D1 and month numbers 1 through 12 in A10:A21. In B10 enter =DATE($D$1;A10;1) and fill down. In C10 enter =DAYSINMONTH(B10) and fill down.

The independent sum of C10:C21 is 366. Changing the year to 2025 gives 365. This table is a transparent check for calendars and allocation schedules because every month’s denominator remains visible.

Do not sum twelve copies of February’s result or use a fixed 30-day assumption while labeling the output actual calendar days.

Advanced application: distinguish equal daily allocation from policy

For a hypothetical monthly quantity of 290 units in February 2024, =290/DAYSINMONTH(DATE(2024;2;1)) targets 10 units per calendar day. In February 2025, a 280-unit quantity similarly targets ten.

This is an equal-calendar-day arithmetic allocation. It does not imply a billing, payroll, legal or accounting policy. Business-day denominators and contractual 30-day conventions are different models and should use their own explicit rules.

Errors and troubleshooting

Validate a real date, and preserve its year as well as its month. The help’s locale warning concerns valid date input; the DATE-based examples avoid ambiguous strings. Invalid-date error displays and timestamp coercion were not native-tested.

If the result appears as an old date instead of 28–31, inspect the output cell format. If a leap-February result is wrong, check the input year and whether the original text date was parsed as intended.

Availability, format and verification

Collabora Office 26.04 desktop help documents this exact function. The saved source was retrieved on 2026-10-13 and hash-verified for this guide on October 15, 2026. It identifies the namespace ORG.OPENOFFICE.DAYSINMONTH and says the function is outside the cited OpenFormula 1.3 standard. This is not cross-product semantic certification.

The first introduced release and last functioning version are unknown. Online/mobile availability is not inferred. No native Collabora or WPS execution was performed. Results are independent calendar/string controls or explicitly identified documented examples. English names and semicolon separators are used.

References