Text()
- Last UpdatedJul 22, 2024
- 1 minute read
Converts a number to text based on a specified format.
Category
String
Syntax
StringResult = Text( Number, Format );
Parameters
Number
Any number or numeric attribute.
Format
Format to use in conversion. Actual string or a string attribute.
Examples
Text(66,"#.00"); ' returns 66.00;
Text(22.269,"#.00"); ' returns 22.27;
Text(9.999,"#.00"); ' returns 10.00;
The following example shows how to use this function within another function:
LogMessage("The current value of FreezerRoomTemp is:" + Text (FreezerRoomTemp, "#.#"));
In the following example, MessageTag is set to "One=1 Two=2".
MessageTag = "One + " + Text(1,"#") + StringChar(32) + "Two +" + Text(2,"#");