The following summarize links from one of the simple number data types (double, float, long, or integer, described below as “number”), to another data type:
A number-to-string or number-to-statusString link results in the string value of that number, for example “78.30” The link also has a “Format” converter property based on a text string, with a blank default value. The blank Format outputs all existing digits with no formatting.
In the Format property, you can enter a Format value using pound signs (#) for digits, 0 numeral(s) for leading/trailing zero(s), and placeholder separators, such as a comma (,) for grouping and/or period (.) as decimal separator. Some Format value examples:
###,###.### — where a source number 123456.789 is string formatted as 123,456.789
###,## — where a source number 123456.789 is string formatted as 123456.79
00000.000 — where a source number 123.78 is string formatted as 000123.780
A number-to-boolean link or number-to-statusBoolean link has a “False Value” converter property, with a default value of 0, such that any number value other than 0 results in a boolean true. If needed, “False Value” can be edited to specify a different
value to associate with false.
A number-to- “different simple number type” link results in that number, unless outside the range of the target data type. For example, a double-to-integer link with a source value of 2147484000 (exceeding max integer value of 2147483647) will result in the integer value of “max” (2147483647).
A number-to-statusNumeric link results in that number.
A number-to-statusEnum link results in that number, unless outside the ordinal (integer) range of a statusEnum data type. For example, a double-to-statusEnum link with a source value of 2147484000 (exceeding max integer value of 2147483647) will result in an Enum (ordinal) value of 2147483647.
A number-to-Time link results in that number of milliseconds added to the base time of 12:00am midnight (00:00). For example, a float value of 900000 is seen as Time 12:15am (00:15).
A number-to-absTime link adds that number of milliseconds to the Java “epoch” date/timestamp of December 31 1969 7pm EST. For example, a long value of 1296509138929 results in an absTime value of January 31 2011 4:25pm EST.
A number-to-relTime link adds that number of milliseconds to 0ms. For example, an integer value of 4800000 results in an relTime value of 1hour 20mins, or -108000 results in -1min 48sec.
Links to other Conversion link "From" notes.
Copyright © 2000-2016 Tridium Inc. All rights reserved.