Date.ToText Function in Power Query

The Date.ToText function in Power Query (M language) converts a date, datetime, or datetimezone value into a text string, optionally using a custom format and culture.

Syntax

Date.ToText(
    dateTime as any,
    optional format as nullable text,
    optional culture as nullable text
) as nullable text

The function has the following parameters:

Example: Convert #date(2025, 8, 24) into a text value.

Power Query M

let
    Source = Date.ToText(#date(2025, 8, 24))
in
    Source 

The output of the above code is:
"24-08-2025"

Note: Result output may vary depending on system locale.

Example: Custom format.

Power Query M

let
    Source = Date.ToText(#date(2025, 8, 24), "yyyy-MM-dd")
in
    Source  

The output of the above code is:
"2025-08-24"

Example: Custom format.

Power Query M

let
    Source = Date.ToText(#date(2025, 8, 24), "dddd, dd/MM/yyyy")
in
    Source  

The output of the above code is:
"Sunday, 24-08-2025"