Results 1 to 3 of 3

Thread: [RESOLVED][2008] Putting comma on a Numeric or String

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [RESOLVED][2008] Putting comma on a Numeric or String

    Elow everyone could anyone tell me how to put comma on a Numeric or String on my Datagridview?


    i.e.

    ---Given No. ---- Converted No.-----
    12345455.2321 = 12,345,455.2321

    And also I need help upon rounding off my numbers like the ff.

    i.e.

    ----Given No. --- Converted No.
    12345455.2321 = 12.3M

    Thank in advance guys..
    Last edited by shyguyjeff; Jun 9th, 2008 at 07:55 PM.

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: [2008] Putting comma on a Numeric or String

    Code:
            Dim num2convert As Decimal = 12345455.2321D
            Dim convtdNUM As String '12,345,455.2321
    
            convtdNUM = num2convert.ToString("#,##0.0000")
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: [2008] Putting comma on a Numeric or String

    to millions
    Code:
            num2convert /= 1000000
            convtdNUM = num2convert.ToString("#,##0.0M")
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

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