Formatting currency

Results 1 to 5 of 5

Thread: Formatting currency

  1. #1
    Join Date
    Dec 1969
    Posts
    55

    Default Formatting currency

    Is there a way to take a number and format it into currency without using & to create a string. I am looking for a method like the Format method in VB.

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Formatting currency

    Yup, it&#039s called FormatCurrency!! :)<BR><BR>See http://help.activeserverpages.com/iishelp/VBScript/htm/vbs107.htm for explicit details.<BR><BR>Dim BillGatesNetWorth<BR>BilLGatesNetWorth = 80000000000<BR>Response.Write "Bill G. is worth " & FormatCurrency(BillGatesNetWorth)<BR><BR>Happy Programming!

  3. #3
    Join Date
    Dec 1969
    Posts
    35

    Default RE: Formatting currency

    Is there a way to do this with JScript? All of my ASPs are in JScript. I&#039d appreciate your input!

  4. #4
    Somu Chandran Guest

    Default RE: Formatting currency

    Go to this URL<BR>http://4guysfromrolla.com/webtech/code/FormatCurrency.shtml


  5. #5
    Randy Shipp Guest

    Default RE: Formatting currency

    Please pardon my newbie ignorance. Does anyone know why, given the FormatNumber() and FormatCurrency() functions supplied on this site, the following code would return "$11,326" instead of "$11,326.00"?<BR><BR>var testtest;<BR>testtest = FormatCurrency(11326, 2, true, false, true);<BR>Response.Write("&#060;P&#062;" + testtest);<BR><BR>Thanks in advance.<BR><BR>Randy...<BR>rshipp@bigfoot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •