Date.MonthName
The name of a date's month, in the culture's language.
Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Date.MonthName(date as any, optional culture as nullable text) as nullable text
| Parameter | Type | Description |
|---|---|---|
date | any | A date, datetime or datetimezone value; null gives null. |
culture | nullable text optional | A culture's name, such as "nb-NO", for its language; left out, the query's culture. |
Returns
nullable text. The month's full name.
Remarks
- Text follows the culture: the one given, else the query's (
Culture.Current), which is the model's Locale for import, else the model's own culture, else en-US. These examples run in en-US unless a culture is given. - A month name sorts alphabetically, April before January: keep
Date.Monthnext to it to sort by.
Examples
The month of an order
Date.MonthName(#date(2024, 3, 15))
"March"
In Norwegian
Date.MonthName(#date(2024, 3, 15), "nb-NO")
"mars"
In German
Date.MonthName(#date(2024, 3, 15), "de-DE")
"März"