ToText(value)
Returns a text value containing the printed representation of the input value.
Parameters
- value
- The value you want to convert to text.
Returns
Text
Remarks
- If the input value is
null, the function will returnnull. - If the input value is Numeric, it will always be converted to a string with 6 digits after the decimal point.
- If the input value is Date, it will be returned in the format
YYYY-MM-DD. - If the input value is Timestamp, it will be returned in the format
YYYY-MM-DD HH:MM:SS. - If the input value is Time, it will be returned in the format
HH:MM:SS. - If the input value is Duration, it will also be returned in the format
HH:MM:SS. - If the input value is User, the function will return the user’s screen name, if available, otherwise the email address.
- If the input value is Boolean, the function will return
"1"fortrueand"0"forfalse.
For more control over the output format of Numeric, Date, Time, and Timestamp values, consider using the Format function instead.
Examples
ToText([Date Column])takes the date value25/3/2013from the Date Column and returns the text value "2013-03-25".ToText([Timestamp Column])takes the timestamp value25/03/2013 10:51:34 AMfrom the Timestamp Column and returns "2013-03-25 10:51:34".ToText([Time Column])takes the time value10:15 AMfrom the Time Column and returns "10:15:00".ToText([Duration Column])takes the duration value30 minutesfrom the Duration Column and returns "00:30:00".ToText([Record Owner])returns the email address or screen name of the user in the Record Owner column.ToText(true)returns "1".ToText(false)returns "0".ToText(10)returns "10.000000".