format a number of type double with specific format
Hi guys, how to format a number of type double with "thousand separator of Comma" and "2 decimal places"? use "modify field" node or others? modify field node, about double type, no options for format. thanks.
-
You can use the Format attribute within the OutputFields grid to format a string value. In this case the Format attribute would be set to %,.2f
In this example that uses the Modify Fields node, the input 'Data' field (which is a double type) is converted to a string and is renamed to 'formattedValue'. The conversion includes the thousand separator and sets the precision to two digits
See the node Help for further information on formatting.
If you want to perform a similar conversion in the Transform node then the following example shows how to output a new field containing the formatted string:
Please sign in to leave a comment.
Comments
2 comments