VvierA Posted October 16, 2012 Share Posted October 16, 2012 Hello, I use Num2Str(2,realvalue) to convert a real to a string and round it with two decimals. The problem is: if realvalue is already a whole number - let's say 56 - the result is 56 as a string. But I want it to be 56.00. Can anybody help? VvierA Quote Link to comment
Miguel Barrera Posted October 16, 2012 Share Posted October 16, 2012 You can check for a decimal point with: IF Pos('.',strVal) = 0 THEN strVal:= Concat(strVal,'.00'); Quote Link to comment
VvierA Posted October 17, 2012 Author Share Posted October 17, 2012 Thank you very much. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.