Contact

WEEKDAY Function (Gnumeric)

Date & Time Beginner Gnumeric

Number weekdays in Gnumeric with explicit Sunday- or Monday-based methods, rotated week starts and verified invalid-method errors.

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

WEEKDAY returns a numerical day-of-week code for a spreadsheet date. The optional method chooses how the seven weekdays are numbered. A returned number has no complete meaning until that numbering convention is known.

The default method 1 uses Sunday=1 through Saturday=7. Method 2 uses Monday=1 through Sunday=7, and method 3 uses Monday=0 through Sunday=6. Methods 11 through 17 use a one-based sequence beginning respectively on Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Use explicit integer methods rather than relying on conversions of fractional codes.

Syntax

WEEKDAY(date, [method])

Worked examples

The original =WEEKDAY(DATE(2025,1,12),2) returns 7: 12 January 2025 is Sunday and method 2 starts at Monday. The same date with the method omitted returns 1; method 3 returns 6. These are different codes for the same weekday, not conflicting calendar answers.

WEEKDAY(DATE(2025,1,13),2) returns 1 for the following Monday. Method 11 gives the same Sunday result 7 as method 2. Method 16 starts on Saturday, so WEEKDAY(DATE(2025,1,12),16) returns 2.

Put the date in A2 and an explicit method in B2, then use =WEEKDAY(A2,B2) in C2. Label the numbering scheme beside the result, especially in an exported dataset.

Advanced use

For a Monday-to-Friday calendar, method 2 allows a weekday test based on whether the result is at most 5. This describes a chosen weekly schedule, not a universal definition of working days. Holidays, alternate weekends and organization-specific rules require additional data.

When grouping dates by weekday, preserve the full date and the method. Reusing codes from different methods without normalization can silently shift every group. A weekday number also does not establish a week-of-year or an ISO week-year.

Errors and troubleshooting

WEEKDAY(DATE(2025,1,12),4) returns #NUM! because 4 is not a supported method. WEEKDAY(“bad”,2) returns #VALUE! for invalid date text. Prefer DATE constructors or verified numeric dates over ambiguous strings.

Date tip: Dates are internally numeric values, while date formatting controls their appearance. Compare actual dates, not text that merely resembles dates.

Official NEWS 0.27 explicitly adds WEEKDAY. That introduction does not establish that every current numbering method existed then; the method table here is scoped to 1.12.57. Modern-date tests do not certify all date-system boundaries.

Availability and verification

  • Introduced: Gnumeric 0.27, explicitly added in official NEWS.
  • Historical source availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-date function module must be included and enabled.
  • Historical check: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

The selected examples and errors were recalculated with the actual Gnumeric 1.12.57 engine under C.UTF-8 on 17 October 2026. Native workbooks and observed outputs are retained. Historical 1.12.62 registration is a separate source check, not a native runtime test. No GUI test or retirement date is established, and the last functioning release remains unverified.

Official references