Results 1 to 3 of 3

Thread: Calculation Problem{Resolved}

  1. #1
    Hyperactive Member
    Join Date
    Mar 02
    Location
    Malaysia
    Posts
    345

    Calculation Problem{Resolved}

    my big problem is how to get .01 in ASP after calculating

    a-b, where a = 4.14 and b = 4.13

    i have tried cdbl, eval,csng etc etc but not getting it

    in vb if i typecasst it to cdec then it works fine..but cdec is not available in ASP
    Last edited by sinha; Jun 17th, 2003 at 08:16 PM.
    Thanks.

  2. #2
    Hyperactive Member Anglo Saxon's Avatar
    Join Date
    Mar 02
    Location
    Durham, UK
    Posts
    259
    Code:
    <%
    a = 4.14
    b = 4.13
    Response.Write formatnumber(a-b,2)
    %>

    --
    Anglo Saxon

  3. #3
    Hyperactive Member
    Join Date
    Mar 02
    Location
    Malaysia
    Posts
    345
    Thanks Anglo.
    Thanks.

Posting Permissions

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