Time.ToText
This function returns a text representation of time. An optional record parameter, options, can be provided to specify additional properties. The culture parameter is only utilized for legacy workflow...
Time.ToText(time as nullable time, optional options as any, optional culture as nullable text) as nullable text
This function returns a text representation of time. An optional record parameter, options, can be provided to specify additional properties. The culture parameter is only utilized for legacy workflows. The record may include the following fields:
- Format: A text value that specifies the format to be used. For more detailed information, please visit https://go.microsoft.com/fwlink/?linkid=2180104 and https://go.microsoft.com/fwlink/?linkid=2180105. If this field is omitted or set to null, the date will be formatted using the default defined by the culture.
- Culture: When Format is not null, Culture determines certain format specifiers. For instance, in "en-US", "tt" represents "AM" or "PM", while in "ar-EG", "tt" represents "ص" or "م". If Format is null, Culture determines the default format to be used. If Culture is null or not provided, the current culture is used.
To accommodate legacy workflows, options and culture can also be text values. This has the same effect as if options = [Format = options, Cul
Transform the time value #time(01, 30, 25) into a text format. The result may vary depending on the current cultural settings.
Example 1:
Using Power Query MTime.ToText(#time(11, 56, 2)) will output "11:56 AM".
Example 2:
Utilize a custom format and the German culture to convert the time value.
Usage: Power Query MTime.ToText(#time(11, 56, 2), [Format="hh:mm", Culture="de-DE"])
Output: "11:56"
Example 3:
Convert the time value using the standard time format.
Usage: Power Query MTime.ToText(#time(11, 56, 2), [Format="T", Culture="de-DE"])
Output: "11:56:02"