OpenBI Docs Buy

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
ParameterTypeDescription
dateanyA date, datetime or datetimezone value; null gives null.
culturenullable 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.Month next 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"

Date.Month, Date.DayOfWeekName, Date.ToText.

Last updated · OpenBI Studio 0.3.79