The Power Query M formula language provides a way to manipulate and transform data within Microsoft Power Query and Microsoft Power BI. One common task when working with data is to retrieve the current date, which can be done using the DateTime.LocalNow() function.
To format the date in a specific way, you can use the Date.ToText() function, which converts a date value into a text string using a specified format string. The format string consists of placeholders for various date and time components, such as "yyyy" for the year, "MM" for the month, and "dd" for the day.
By combining these functions, you can retrieve the current date and format it in a variety of ways, depending on your needs.
Source code viewer
DateTime.ToText(DateTime.LocalNow(), "dd.MM.yyyy")Programming Language: Text