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: 

Metric String to Number

Solved!
Go to solution

Does there exist a way to convert the string "1ms" into the number 0.001?  Same with the µ (micro), k (kilo), M (mega) and any other metric symbols?  I can do this manually no problem but I thought someone may have done this already.  Thanks.

0 Kudos
Message 1 of 6
(3,720 Views)
Solution
Accepted by Hooovahh

%p my good friend.

!0.png


"Should be" isn't "Is" -Jay
Message 2 of 6
(3,714 Views)

try that one with '1ms' as the input as the original post stated.

0 Kudos
Message 3 of 6
(3,702 Views)

Yes there is a limitation,  Nothing a regex can't handle.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(3,700 Views)

@Darin.K wrote:

try that one with '1ms' as the input as the original post stated.


Yes I noticed that right away but in this case I can simply the last char.  Glad it is so simple.

Message 5 of 6
(3,692 Views)

@Darin.K wrote:

try that one with '1ms' as the input as the original post stated.


It will be easy as soon as NI fixes CAR 425562...  I've ran into this enough times.  I ended up putting in spaces between the prefix and the unit to get the Scan From String to work properly.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(3,675 Views)