hello,
I would like to display (#.###) stile some of my DB let say if it is 1 , it should be displayed like this (1.000) all the column should be the same format ex:
2.333
0.002
0.000
1.003
0.120
however I run the code and I cant get this format it just eliminate the 0's.
Is there any way I can display the way I want .
Thank you
swat
Page 1 of 1
Number format Number format
#2
Posted 24 June 2003 - 12:00 AM
Swat,
here is how you can do this:
1. Build set of ASP pages using ASPRunner.
2. Open include/aspfunctions.asp file and insert the following two lines into GetData function:
3. Add the following line to include/variables.asp:
4. In ..._list.asp file replace
with
where ID is the field that you like to be formatted. Repeat this replacement for each field that you like to format ###.### way.
I hope this helps.
Best regards,
Sergey Kornilov
here is how you can do this:
1. Build set of ASP pages using ASPRunner.
2. Open include/aspfunctions.asp file and insert the following two lines into GetData function:
if Format = FORMAT_NUMBER and GetData<>"" _ then GetData = FormatNumber(GetData,3)
3. Add the following line to include/variables.asp:
Const FORMAT_NUMBER = "Number"
4. In ..._list.asp file replace
Response.Write GetData(rsData.Fields("ID"), "")
with
Response.Write GetData(rsData.Fields("ID"), FORMAT_NUMBER)
where ID is the field that you like to be formatted. Repeat this replacement for each field that you like to format ###.### way.
I hope this helps.
Best regards,
Sergey Kornilov
Best regards,
Sergey Kornilov
Sergey Kornilov
Page 1 of 1