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!

Formatting currency from SQL 7 using ASP

Status
Not open for further replies.

tgif

Technical User
Aug 21, 2000
14
ZA
I am displaying data on a ASP page which has been drawn from a SQL database. The column is formatted as "money" in the database. When the values are displayed in the ASP page they display as "259" with no decimal points, decimals or currency sign as set up in local regional settings. I need the number to display as "$259.00".

Any help please...
 
You need to use formatcurrency() function:
Syntax:
FormatCurrency(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])

In your case it would be: formatcurrency("259",2)
 
Thanks, I was using that function but it kept returning a datatype mismatch. I eventually found that when I imported the data from access the monetary values were imported as text.

The level of patience has exceeded all expectations...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top