This topic is locked
[SOLVED]

 Formatting Numbers on List

4/28/2004 4:17:23 PM
ASPRunnerPro General questions
D
dan_vt author

I love the product. It does everything it seems like it should.
One problem: I cannot figure out how to format numbers displayed in a list.
For instance, I have a list of numbers that are computed at runtime. Here is a sample of those numbers:
Market Share %

0.943730953417501

0.940274337969137

0.881528856403228
These should be formatted as:

Market Share %

94.4%

94.0%

88.2%
I assume there is an easy way to do this. I just have not figured it out yet
As always, any information helping to resolve this problem will be appreciated immensely.
-Dan

swat 4/29/2004

dan_vt
try this;

response.write "formatnumber(mynumber,1)" & "%"


take a look at this ASP code also, how to format numbers:

FormatNumber(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit,

            UseParensForNegativeNumbers, GroupDigits)
D
dan_vt author 4/29/2004

thanks swat, that looks like it will work... but where do I put that change into the pages produced by ASP Runner?

swat 4/29/2004

dan_vt-
Look at the ....._list.asp file and it will be close to the end where you display all data using:

Responce.Write ....
D
dan_vt author 4/29/2004

AWESOME! Thank you a bunch swat. Just what the Dr. ordered!
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=1725&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />