I have some values which is
12.394845758
12304.92876294
1290.2883772
I want to convert it to
12.39
12304.92
1290.28
with the two decimal point, Can is it possible.
Someone send the Code.
|
I have some values which is
12.394845758
12304.92876294
1290.2883772
I want to convert it to
12.39
12304.92
1290.28
with the two decimal point, Can is it possible.
Someone send the Code.
Open HELP, look at the FORMAT function, specifically the User-Defined Numeric Formats
R.K. McSwain | CAD Panacea |
You definitely need to check out my post on your other question (fos < 1.09 and > 4#) Once you start writing programs, numbers are no longer what think they are. How computers represent numbers internally is a whole topic by itself.
Yes, you can round numbers and make them appear to be what you want, but if you start doing arithmetic with these numbers, you are going to get some totally mysterious results.
Don't forget...... all of your arithmetic is being done in binary. That alone should blow your mind! Programs like acad and excel shield you from the weirdness of number theory, but when you open that VBAIDE window, the shield drops and the fun starts.
http://www.lahey.com/float.htm.
Good point.Originally Posted by MikeJarosz
I once found a program that took the internal number, placed it in a dialog for the user to edit, then read those values from the dialog and placed them back in the program.
The problem was that the edit box in the dialog truncated the long numbers to something like 7 or 8 decimal places. So even if the user didn't edit those numbers, precision was lost just be opening and closing the dialog.
R.K. McSwain | CAD Panacea |