Date.DayOfWeekName
DateReturns the name of the day of the week for the given date.
Syntax
Date.DayOfWeekName(date as any, optional culture as nullable text) as nullable textParameters
| Name | Type | Required | Description |
|---|---|---|---|
date | any | Yes | A date, datetime, or datetimezone value. |
culture | text | No | A culture code such as "en-US" or "fr-FR" that controls the language of the returned day name. |
Return Value
text — The localized name of the day of the week (e.g., "Monday").
Remarks
Date.DayOfWeekName returns the full, localized name of the day of the week for a given date, datetime, or datetimezone value. When no culture is provided, the function uses the current locale of the host environment. Always specify culture explicitly (e.g., "en-US") in production queries to ensure consistent output regardless of where the query runs.
To get a short name (e.g., "Mon"), use Date.ToText with the format string "ddd" instead. If the input is null, the function returns null.
Date.DayOfWeekName returns the display name only — it does not return a number. If you need the numeric day-of-week (0 = Sunday, 1 = Monday, etc.) for sorting or comparisons, use Date.DayOfWeek instead. You can combine both: add a sort column using Date.DayOfWeek and a display column using Date.DayOfWeekName.
Examples
Example 1: Add day name column to Sales table
Table.AddColumn(
Table.SelectColumns(
Table.FirstN(Sales, 5),
{"OrderID", "OrderDate"}
),
"DayName", each Date.DayOfWeekName([OrderDate], "en-US"), type text
)OrderID | OrderDate | DayName | |
|---|---|---|---|
| 1 | 1 | 1/15/2024 | Monday |
| 2 | 2 | 1/18/2024 | Thursday |
| 3 | 3 | 2/1/2024 | Thursday |
| 4 | 4 | 2/10/2024 | Saturday |
| 5 | 5 | 3/5/2024 | Tuesday |
Example 2: Return a day name in French
#table(
type table [Date = date, DayNameFR = text],
{{#date(2024, 3, 15), Date.DayOfWeekName(#date(2024, 3, 15), "fr-FR")}}
)Date | DayNameFR | |
|---|---|---|
| 1 | 3/15/2024 | vendredi |
Example 3: Add both a sort key and a display name
Table.AddColumn(
Table.AddColumn(
Table.SelectColumns(Table.FirstN(Sales, 5), {"OrderID", "OrderDate"}),
"DayOfWeekNum", each Date.DayOfWeek([OrderDate], Day.Monday), Int64.Type
),
"DayOfWeekName", each Date.DayOfWeekName([OrderDate], "en-US"), type text
)OrderID | OrderDate | DayOfWeekNum | DayOfWeekName | |
|---|---|---|---|---|
| 1 | 1 | 1/15/2024 | 0 | Monday |
| 2 | 2 | 1/18/2024 | 3 | Thursday |
| 3 | 3 | 2/1/2024 | 3 | Thursday |
| 4 | 4 | 2/10/2024 | 5 | Saturday |
| 5 | 5 | 3/5/2024 | 1 | Tuesday |