Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

DIASEMANA

On this page (10)

Day of the week (1 = Sunday … 7 = Saturday).

FieldValue
CategoryDate and time
TypeScalar (operates value by value)
Arity1 argument (fixed)
Compiles to SQL (calculated column)Yes
VersionFormula engine v3.

Aliases#

Canonical name: DIASEMANA. Accepted aliases (case-insensitive): weekday, dayofweek.

Syntax#

code
DIASEMANA(expr)

All arguments are expressions.

Returns#

Number.

Null handling#

Invalid or missing dates become a friendly error or blank, depending on the function.

Evaluation context#

Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).

Differences from DAX#

  • DAX equivalent: WEEKDAY
  • Compatibility: Compatible with DAX
  • Note: 1 = Sunday … 7 = Saturday (WEEKDAY type 1).

Examples#

code
DIASEMANA(pedido_em)

Example with values#

Input: date 2025-06-15 (Sunday).

code
DIASEMANA(DATA(2025;6;15))  →  1

Expected result: 1

Business example#

Time analysis — order age, accrual month/year, accounting close.

Common errors#

Typos in a column name, an incompatible type, or an invalid argument become a friendly message (pt-BR) — the engine never silently returns a wrong number.


← Back to the formula index

Related links