Display 16 digit numbers without scientific notation
Does anyone know how to display 16 digit numbers without scientific notation?
Now I have this:
dim rt = 4444555544446666
response.write (rt & "<br>")
rt = ((rt-1111333)^.5)/66
response.write (rt & "<br>")
rt = (( (rt*66)^2)+1111333 )
response.write (rt & "<br>")
and I get:
4444555544446666
1010113.63489608
4.44455554444667E+15
I need to diplay '4.44455554444667E+15' without scientific notation which is: '4444555544446666'
Any help greatly appreciated!
Re: Display 16 digit numbers without scientific notation
Re: Display 16 digit numbers without scientific notation
you need it to become a string, however getting it to the string could be an issue in itself... if you are willing to suffer some data loss you could get it to work, eg string = (rt / 100000000000000) & "00000000000000"
but this would sort of defeat the purpose so u need to figure out a way to get the rest.. however perhaps you could then do this
string1 = clng(rt / 100000000000000) & "0000000000000"
double1 = rt - double.parse(string1)
string2 = clng(rt / 100000000000000) & double1
that might work for you, let me know how it goes
Re: Display 16 digit numbers without scientific notation
actually clng rounds up, so ull need to make ur own function to do the cutting without rounding. unless ther is one already?
Re: Display 16 digit numbers without scientific notation
The Decimal type does not use scientific notation when converted to a string, e.g. for displaying on-screen.
Also, this:
VB Code:
dim rt = 4444555544446666
is late binding. I hope you don't do that in your real code.
Re: Display 16 digit numbers without scientific notation
Decimal displays full digits? that's alright :P
tell you what, it's little things like that you pickup from messing on forums