Hello
I created a calculation and the result obtained using NumberFormat does not correspond to the calculator display.
Example: 0.5 x 229.45 = 114.725
When I use two decimal places the calculator the result is 114.73
But when I use NumberFormat2 as follows:
MyCalc = 0.5 x 229.45
MyResult = 114.725
Edit1.Text=NumberFormat2(MyResult, 0,2,2, False)
or
Edit1.Text NumberFormat2(MyResult, 0,2,2, True)
I have the same result for True and False, when the correct 114.72 would be 114.73
Thanks all.
I created a calculation and the result obtained using NumberFormat does not correspond to the calculator display.
Example: 0.5 x 229.45 = 114.725
When I use two decimal places the calculator the result is 114.73
But when I use NumberFormat2 as follows:
MyCalc = 0.5 x 229.45
MyResult = 114.725
Edit1.Text=NumberFormat2(MyResult, 0,2,2, False)
or
Edit1.Text NumberFormat2(MyResult, 0,2,2, True)
I have the same result for True and False, when the correct 114.72 would be 114.73
Thanks all.