fromtime(X;Y)
Formats a time value in the form
HHMMSS
as a string according to a template. (Available as of version 15.19)
Syntax
fromtime(X;Y)
Input
Argument | Type | Description |
---|---|---|
X |
|
A scalar value or the name of a column
containing date-related values Valid values can be of the form:
|
Y |
text | A "template" string specifying how the output should be formatted. The following is a partial list of string templates:
|
Return Value
Returns a string value of the date formatted using the template specified in the
Y
argument.
For more information about date formats, see Dates and time.
Example
In the following example, fromtime(X;Y)
converts a time
value into a string value in the form 'HH:MI:SSpm'
. Note that the template
supplied as the Y
argument converts the 24-hour time into an AM/PM time
format.
<base table="pub.demo.weather.wunderground.observed_hourly"/> <sel value="(zipcode='10017')"/> <willbe name="time_string" value="fromtime(time;'HH:MI:SSpm')" label="Time (string)"/> <colord cols="date,time,time,time_string"/>