Closed Thread
Results 1 to 3 of 3

Thread: format currency to display by thousands

  1. #1
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    format currency to display by thousands

    Hey All,

    I have a currency field in SQL 2000 - money(8) in my table with value ex: 117000 and in ASP, I have the following:

    Code:
    <TD bgcolor="#E0FFFF" align=center><%=formatcurrency(rs("ItemCost"),0)%></TD>
    
    It displays as $117,000 on the web view, but I don't want it to show this, I want it to show $117 only.

    Is this possible?

    Thanks!

  2. #2
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Divide it by 1000 first and take the integer of the result.

  3. #3
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Thanks Wolffy!
    Here is what I did and it looks good, like $117.

    Code:
    <%
    intItemCost = rs("ItemCost")
    intItem = FormatCurrency((intItemCost / 1000),0)
    %>
    
    Code:
    <TD bgcolor="#E0FFFF" align=center><%= intItem %></TD>
    
    Thanks so much!!!

Closed Thread

Bookmarks

Posting Permissions

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

SEO by vBSEO