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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a Currenct Field

Status
Not open for further replies.

mlocurci

MIS
Oct 17, 2001
210
US
I have an asp page that reads from an Access Db. The one field that is read, is a price field. When it gets to the web, its just a number. What can i do?

SELECT CCur(Sum([GCAmount1]+[GCAmount2]+[GCAmount3]+[GCAmount4]+[GCAmount5]+[GCAmount6]+[GCAmount7]+[GCAmount8]+[GCAmount9]+[GCAmount10]+[GCAmount11]+[GCAmount12]+[GCAmount13]+[GCAmount14]+[GCAmount15])) AS CalcTotal
FROM giftCardSales INNER JOIN ShippingMethods ON giftCardSales.ShippingOption = ShippingMethods.ShippingMethod;
 
Code:
'pretend rs is the record set and price is the currency field
Response.Write "$" & rs("price")
or
Response.Write FormatCurrency(cCur(rs("price")),2)

The FormatCurrency function is defined something like this:
Code:
FormatCurrency(Expression [,NumbersAfterDecimal [,IncludeFrontDigit [,ParensForNegativeNumbers(?) [,DigitGroup(?)]]]])

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top