05-21-2009 09:00 AM
Hi,
I have a computed value that returns 10 plus digits after the decimal place, exampe: 2.2482352941176.
What is the easiest way to edit this value in TestStand to return a number that is rounded up to 2 decimal places (2.25)?
Thanks & Regards,
Don1.
Solved! Go to Solution.
05-21-2009 09:37 AM
01-23-2015 07:51 AM
That will only work for positive numbers
This should suit you for both positive and negative numbers
Round(Locals.MyValue* 100,4) / 100
01-23-2015 12:22 PM
One way to do this is to use the TestStand functions Str and Val. The %.2f rounds the number to 2 decimal places.
Val(Str(Locals.MyValue, "%.2f"))
Peter