<%
' My ASP formatting number sample
mynumber=123.4567
Response.Write "
" & mynumber & "
"
Response.Write "formatnumber(mynumber,0)" & "
"
Response.Write FormatNumber(mynumber,0) & "
"
Response.Write "formatnumber(mynumber,2)" & "
"
Response.Write FormatNumber(mynumber,2) & "
"
Response.Write "formatnumber(mynumber,6)" & "
"
Response.Write FormatNumber(mynumber,6) & "
"
mynumber=.4567
Response.Write mynumber & "
"
'0 means means no leading zeroes
Response.Write "formatnumber(mynumber,2,0)" & "
"
Response.Write FormatNumber(mynumber,2,0) & "
"
'1 means means pad with leading zeroes
'response.write "formatnumber(mynumber,2,1)" & "
"
'response.write formatnumber(mynumber,2,1) & "
"
'mynumber=-123.4567
'response.write mynumber & "
"
'0 means means no parentheses for negative numbers
'response.write "formatnumber(mynumber,2,0,0)" & "
"
'response.write formatnumber(mynumber,2,0,0) & "
"
'1 means means yes parentheses for negative numbers
'response.write "formatnumber(mynumber,2,0,1)" & "
"
'response.write formatnumber(mynumber,2,0,1) & "
"
%>