LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric indicators with commas every 3 digits

Hello,
 
   Is there a way to have numeroic indicators display value that have commas every 3 characters? I am using numeric indicators to display value the are very large, I am currently seeing 30000000, I would like to see 30,000,000.
 
Regards,
 
Kaspar
Regards,


Kaspar
0 Kudos
Message 1 of 5
(4,480 Views)

For an indicator, it does not matter if it is numeric or text. 😉

Just format your number any way you want into a string using some code and use a string indicator to display it.

Message 2 of 5
(4,477 Views)
You should also keep in mind that your desired format will prevent your program from being useful in any countries that use comma as decimal seperator (e.g. Germany).
 
Maybe you should come up with a better scheme, e.g. spaces or single-quotes every 3 integer digits, for example to make the code more universal. 🙂
Message 3 of 5
(4,458 Views)
Hi Altenbach,

what is good format string in this case (if it exists)?
I say XControl!

In europe it used to be common sense to have a '.' between thousands/millions.

A single quote seems silly to me (IMHO) 30'000'000,33??

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 5
(4,439 Views)
I probably would use a plain space between thousands.
 
Yes, an X-control is probably best, but requires some effort. You could even define a method to switch things depending on localization. 😉
 
For the formatting steps: We went through all this a few years ago. The last two examples (mine and LiamK's) in the following thread should be OK. I don't know which one is more efficient, so please test if this is of concern.
0 Kudos
Message 5 of 5
(4,419 Views)