LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

appending zero number to string conversion

Solved!
Go to solution

So I have a 0 in int format. I want to convert it to a string so that it says "00." Is there an easy way to do it in labview? or If I have 1 in int, I want to convert it to a string value of "01." Help?

 

 

Thanks!

0 Kudos
Message 1 of 3
(3,671 Views)
Solution
Accepted by topic author d1sturbanc3
You just need to use %02d as the format specifier with  your Format Into String function. If you move your mouse over the function and right click, you can select 'Edit Format String'. The popup will provide help.
Message 2 of 3
(3,661 Views)

Hi,

 

You can use "Format into String" with a format of "%02d."

 

Change the 2 if you want a different number of digits. Omit the "." if you don't want a decimal point.

 

Rod.

 

EDIT: Bother, too slow in typing! PS. Still check out the decimal point!

Message Edited by Rod on 19/08/2009 17:01.. 05:01 PM
0 Kudos
Message 3 of 3
(3,656 Views)