Help converting numbers.
Heisenberg last edited by
Hey everyone I'm just getting started with OB and I'm having trouble converting numbers like 1970 to 1,970 or 20768 to 20,768.
I tried using the compute function but it adds a dot instead of a comma and removes the 0 at the end.
var testnumber is the variable where your plain number is stored you need to change it in line 5 to the variable where your number is stored
var change_this_to_variable_name_you_want is the variable name that will have your number with the thousands seperator change the variable name in line 5 and line 7 as you wish
and of course delete the first function block it was only to create a test number
You could also replace the commas with nothing before passing them to the compute block