SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎TARGET Object‎ > ‎

target.FormatNumeric


Platform Objects


Description

Formats a numeric value according to a specified format.


Syntax


Target.FormatNumeric(value, format)


Parameters


variant value - the numeric value to be formatted
string format - the numeric format to be applied to the value (See numeric formats.)

Return value


string - a text representation of the numeric value according to the input format.


Example

Sample code

Dim val, dt
dt = CDbl( "4123.26" ) 
val = UserVar.FormatNumeric( dt, "#,###" ) ' the return value: 4,123
val = UserVar.FormatNumeric( dt, "#,###.#" ) ' the return value: 4,123.3
val = UserVar.FormatNumeric( dt, "E" ) ' the return value: 4.12326E+003 


See also

Platform Objects and Methods
target.FormatDate
target.GetDateRange
Target Methods