dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: How Can I limit decimal places to 2?

  1. #1
    Join Date
    Mar 2006
    Posts
    113

    How Can I limit decimal places to 2?

    Here's the code:

    <%
    Dim millerProd, totalProd
    Dim millPercentage

    millerProd=visitInfoMain.Fields.Item("millerProduct").Value
    totalProd=visitInfoMain.Fields.Item("totalProduct").Value
    millPercentage = (millerProd / totalProd) * 100
    %>

    <%= millPercentage %>

    How can I limit the display to 2 decimal points?

  2. #2
    Join Date
    Dec 2003
    Location
    England, UK
    Posts
    432
    <%=formatnumber(millpercentage,2)%> should do the trick.

  3. #3
    Join Date
    Mar 2006
    Posts
    113
    You're right. That did the trick.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles