ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format String from 1 Digit to 3 digits

Hi @all,

how can i format a string with 1 digit to a string with 3 digits, like this: 1--->001 or 12---->012 or 0---->000 and if the string is 999 it have to be 999 😉

Tbanks,

Thommy
0 Kudos
Message 1 of 2
(3,134 Views)
Convert the string to a number, then convert it back with the width and padding set.

Hope that this helps,
Bob
Message 2 of 2
(3,126 Views)