Results 1 to 3 of 3

Thread: [RESOLVED] how to delete the numebr after comma or befor it

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    syria
    Posts
    829

    Resolved [RESOLVED] how to delete the numebr after comma or befor it

    Hello
    How to delet the numbers after comma
    I tried by use Cint with this nunmber 12.834 but it make the number 13
    But i want it to be 12
    And what is way to make this nunber like this 0.834
    Thank you for help

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,712

    Re: how to delete the numebr after comma or befor it

    Use Math.Truncate

    Code:
    dim myValue as double = 12.834
    dim intPortion as integer= cint(Math.Truncate(myValue))
    dim fractionPart as double = myValue - intPortion
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    syria
    Posts
    829

    Re: how to delete the numebr after comma or befor it

    Thank you for help

Posting Permissions

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



Click Here to Expand Forum to Full Width