Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple?

Status
Not open for further replies.

Naoise

Programmer
Dec 23, 2004
318
IE
Environment : MSSQL, ASP

I have a value ie 1250 in a field in MSSQL of type decimal. If I retrieve this field and display it it will display like 1250 where I would like 1,250 to be displayed. Is there a function either at the data access or business layer where something like this would work :

SELECT DisplayWithComma(Amount) FROM tblMoney

or

strAmount = DisplayWithComma(MyRecordSetObject("Amount"))
response.write strAmount

Thanks,
Naoise
 
You need the FormatNumber() VBScript function.
 
strAmount = DisplayWithComma(MyRecordSetObject("Amount"))
response.write FormatNumber(strAmount)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top