Time.ToText

语法

Time.ToText(time as nullable time, optional options as any, optional culture as nullable text) as nullable text

关于

返回 time 的文本化表示形式。 可以提供可选 record 参数 options 来指定额外的属性。 culture 仅用于旧工作流(请参阅下文)。 record 可以包含以下字段:

若要支持旧工作流,optionsculture 也可以是文本值。 这与 options = [Format = options, Culture = culture] 具有相同的行为。

示例 1

#time(01, 30, 25) 转换为 text 值。 结果输出可能因当前区域性而异。

使用情况

Time.ToText(#time(11, 56, 2))

输出

"11:56 AM"

示例 2

使用自定义格式和德语区域性进行转换。

使用情况

Time.ToText(#time(11, 56, 2), [Format="hh:mm", Culture="de-DE"])

输出

"11:56"

示例 3

使用标准时间格式进行转换。

使用情况

Time.ToText(#time(11, 56, 2), [Format="T", Culture="de-DE"])

输出

"11:56:02"

results matching ""

    No results matching ""