Formualizer Docs
ReferenceFunctionsDate & Time Functions

WEEKDAY

WEEKDAY: Returns the day-of-week index for a date serial with configurable numbering.

Summary

Returns the day-of-week index for a date serial with configurable numbering.

Remarks

  • Default return_type is 1 (Sunday=1 through Saturday=7).
  • Supported return_type values are 1, 2, 3, 11-17; unsupported values return #NUM!.
  • Input serials are interpreted with Excel 1900 date mapping, including its historical leap-year quirk.

Examples

Default numbering (Sunday-first)
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
2
Monday-first numbering
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
1

FAQ

Why do I get #NUM! for some return_type values?

WEEKDAY only accepts specific Excel return_type codes (1, 2, 3, 11-17); other codes return #NUM!.

Runtime metadata

Category

Date & Time

Signature

WEEKDAY(arg1: Number, arg2…: Number)

Arity

min 1, max variadic

Arguments

arg1

Number · Scalar · coercion NumberLenientText

arg2

Number · Scalar · coercion NumberLenientText

Caps

PURE

Source

On this page