Time.FromText

Syntax

Time.FromText(text as nullable text, optional culture as nullable text) as nullable time

About

Creates a time value from a textual representation, text, following ISO 8601 format standard.

  • Time.FromText("12:34:12") // Time, hh:mm:ss
  • Time.FromText("12:34:12.1254425") // hh:mm:ss.nnnnnnn

Example 1

Convert "10:12:31am" into a Time value.

Time.FromText("10:12:31am")

#time(10, 12, 31)

Example 2

Convert "1012" into a Time value.

Time.FromText("1012")

#time(10, 12, 00)

Example 3

Convert "10" into a Time value.

Time.FromText("10")

#time(10, 00, 00)