rounding off numbers is ASP

Results 1 to 4 of 4

Thread: rounding off numbers is ASP

  1. #1
    Perkovic Guest

    Default rounding off numbers is ASP

    How can I round off a number to the nearest integer? Thanks... /Perkovic

  2. #2
    Join Date
    Dec 1969

    Default RE: rounding off numbers is ASP

    Syntax<BR>Round(expression[, numdecimalplaces])

  3. #3
    Perkovic Guest

    Default one more question

    Thanks... But if I for example have got a variable called "thenumber" and I want to divide it in two and then round it off then how should I write it?

  4. #4
    Perkovic (Newbie) Guest

    Default Hmm... Can someone please check this code?

    This exemple was in ASPfaqs.Com:<BR><BR>&#060;%<BR> Response.Write RoundTo(12.4, 5) &#039; Writes 10<BR> Response.Write RoundTo(12.5, 5) &#039; Writes 15<BR><BR>&#039; Negative numbers behave slightly differently:<BR> Response.Write RoundTo(-12.5, 5) &#039; Writes -10<BR> Response.Write RoundTo(-12.51, 5) &#039; Writes -15<BR>%&#062; <BR><BR>...So will it work if I write it like this:<BR>&#060;%<BR> Response.Write RoundTo(rs.thenumber, 5) <BR>%&#062; <BR>

Posting Permissions

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