Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: round number...

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts

    round number...

    dear,

    i face a problem... when we round a decimal number(CInt), it get diiferrent that i want...
    e.g
    0.5 i get 0
    1.5 i get 2
    2.5 i get 2
    3.5 i get 4
    .
    .

    But what i want is
    0.5 should be 1
    1.5 should be 2
    2.5 should be 3
    3.5 should be 4
    ....
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Round(Number, NumDecimalPlaces)

    where NumDecimalPlaces is optional, if not specified, the number is rounded off to an integer.


  •  

    Posting Permissions

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