help with function - need to round off

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omar999
    New Member
    • Mar 2010
    • 120

    #1

    help with function - need to round off

    can someone please tell me how to modify my function to round off to a whole number

    Code:
    <%
    function discount(listedValue)
    Discount = 0.9 * listedValue
    End function
    %>
    I've tried this but doesnt work..

    Code:
    <%
    function discount(listedValue)
    round(Discount,2) = 0.9 * listedValue
    End function
    %>
    thanks in advance
    Omar.
  • omar999
    New Member
    • Mar 2010
    • 120

    #2
    UPDATE: never mind I've worked out.

    this is my working function
    Code:
    <%
    function discount(listedValue)
    Discount = round(0.9 * listedValue)
    End function
    %>
    im a happy bunny

    Omar.

    Comment

    Working...