This topic is locked

Formatting of numbers

8/3/2006 9:51:10 AM
ASPRunnerPro General questions
R
rgke author

Is there any way of formatting numbers so that they have commas between the thousands, but no decimal places shown? If I define the output as number, it gives me two decimal places by default.
I am using a SQL Server tables.

Alexey admin 8/3/2006

Hi,
try to modify GetData function in generated include\..._aspfunctions.asp file

Find this snippet there:

if Format = FORMATNUMBER and GetData<>"" and IsNumeric(GetData)

then GetData = FormatNumber(CDbl(GetData), 2)



and replace it with:

if Format = FORMATNUMBER and GetData<>"" and IsNumeric(GetData)

then GetData = FormatNumber(CDbl(GetData), 0)

R
rgke author 8/4/2006

OK Cheers