This function interprets its parameters the same as the FORMAT_DATETIME does, see that article for more details.
FORMAT_TIME(time, format_string, locale) -> formatted_time_string
time (type: time)
format_string (optional, type: string, default: ISO 8601 Format, "YYYY-MM-DDThh:mm:ssZ")
string representing the format to be outputted. The Date units available in the format can be found in Data and Time Formatting Options.
locale (optional, type: string, default: The user's current locale)
The locale the time should be formatted in. This will configure which language formats containing month, and weekday names. Locale must match a valid LCID String.
formatted_time_string (type: string)
The formatted Time.
For the following examples assume we have a variable named example_time that holds a Time that would format to the string "9:41 am".
FORMAT_TIME( example_TIME, "h:mm a" ) -> "9:41am"
As with FORMAT_DATETIME, when called with no format string, FORMAT_TIME will generate an ISO 8601 and RFC3339 compatible timestamp. The date portion of the timestamp will default to January 1st, 1970.
FORMAT_TIME(example_time) -> "1970-01-01T09:41:00Z"
The TIME_FROM_FORMAT function is the opposite of FORMAT_DATETIME. Rather than converting a DateTime to a String, it converts a String into a DateTime by parsing with a given format string.