LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dot after unit thousands

Solved!
Go to solution

I want to separate a number after each thousands unit as a dot or a comma.
For example, if I have 12345678, it becomes 12,345,678 or 12.345.678
Can anyone help me with this problem?
Thanks

0 Kudos
Message 1 of 6
(2,669 Views)
Solution
Accepted by Vu_Anh

Unfortunately, LabVIEW doesn't have a format specifier to separate groups of 3 in a numeric display.  You'll have to do it with a string indicator.

 

I think I created a subVI to do this, but I can't find it at the moment.

 

I recommend voting for this idea.  https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Visual-Aides-Numeric-Separators/idi-p/941273

 

I found my VI, but it did more than just commas.  But luckily I put a note in it that told me where I got the heard of the code.

 

See https://forums.ni.com/t5/LabVIEW/How-can-I-format-a-large-number-to-have-comma-separators/m-p/322518...

 

 

 

Message 2 of 6
(2,645 Views)

Thank you very much. It is what I need for my VI.

0 Kudos
Message 3 of 6
(2,625 Views)

Here is another way to do the same thing.

 

Example.png

Tim
GHSP
Message 4 of 6
(2,615 Views)

I recommend the link I posted above.  Tim's example only works with integers.  If you feed it a value with a decimal fraction portion, it will round it to the nearest integer.

 

PS:.  "Separator" 

Message 5 of 6
(2,585 Views)

I don't get paid to spell. : ) That is part of why I love LabVIEW. I try but one does slip through every once in a while.

Tim
GHSP
0 Kudos
Message 6 of 6
(2,581 Views)