converting double to string

M

masoud bayan

I have some values in type of double such 0.00009 , 0.0000007, when I want
to show them in a text box and convert them to string they are changed to
scientific notation while I want to show them as they are.
I tried to use tostring("f") but it needs to have a precision number after
*f* which will cause always have fix number of characters (for example if
use f10 then 0.09 is converted to 0.09000000 while I need to show it as
0.09).
do you any suggestion of how I can convert such a numbers to string and show
them as they are not as scientific notation?

Thanks for any feedback
 
M

Mary Chipman

See the Help topic "Standard Numeric Format Strings", which lists all
of the format specifiers you can use to get your numbers to display
the way you want them to.

--Mary
 
M

masoud bayan

Thanks for your reply.
I have seen that before but could not find any answer for this question.

Masoud
 
J

Josip Medved

I have some values in type of double such 0.00009 , 0.0000007, when I want
to show them in a text box and convert them to string they are changed to
scientific notation while I want to show them as they are.
I tried to use tostring("f") but it needs to have a precision number
after
*f* which will cause always have fix number of characters (for example if
use f10 then 0.09 is converted to 0.09000000 while I need to show it as
0.09).
do you any suggestion of how I can convert such a numbers to string and
show
them as they are not as scientific notation?


ToString("0.########")
 
M

masoud bayan

Thanks Josip,
Your reply is exactly what I need!
It is much more helpful than the suggestion >> *See the Help topic "Standard
Numeric Format Strings", *

Masoud
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top