Display personnal format for numeric value

Discussion in 'ASP .Net' started by eric_caron_31@msn.com, Sep 8, 2004.

  1. Guest

    Here's my problem, I read numeric value and I want to display this
    value like this : 123 678.

    Value read : 123678
    Value display : 123 678

    I want space for separator

    thanks for your help
    , Sep 8, 2004
    #1
    1. Advertising

  2. Thomas Dodds Guest

    Format(intValue,"### ###") is intValue is a number datatype

    <> wrote in message
    news:...
    > Here's my problem, I read numeric value and I want to display this
    > value like this : 123 678.
    >
    > Value read : 123678
    > Value display : 123 678
    >
    > I want space for separator
    >
    > thanks for your help
    Thomas Dodds, Sep 8, 2004
    #2
    1. Advertising

  3. Guest

    Yes it's a numeric datatype but actually, it display ### ### not the
    numeric value

    Why ?

    On Wed, 8 Sep 2004 09:15:32 -0400, "Thomas Dodds"
    <> wrote:

    >Format(intValue,"### ###") is intValue is a number datatype
    >
    ><> wrote in message
    >news:...
    >> Here's my problem, I read numeric value and I want to display this
    >> value like this : 123 678.
    >>
    >> Value read : 123678
    >> Value display : 123 678
    >>
    >> I want space for separator
    >>
    >> thanks for your help

    >
    , Sep 8, 2004
    #3
  4. Greg Burns Guest

    Dim s As String

    ' Gets a NumberFormatInfo associated with the en-US culture.
    Dim nfi As System.Globalization.NumberFormatInfo = New
    System.Globalization.CultureInfo("en-US", False).NumberFormat
    nfi.NumberDecimalDigits = 0

    ' Displays a value with the default separator (",").
    Dim myInt As Int64 = 123678
    s = myInt.ToString("N", nfi)

    ' Displays the same value with a blank as the separator.
    nfi.NumberGroupSeparator = " "

    s = myInt.ToString("N", nfi)


    maybe overkill for what you are looking to do...

    Greg

    <> wrote in message
    news:...
    > Here's my problem, I read numeric value and I want to display this
    > value like this : 123 678.
    >
    > Value read : 123678
    > Value display : 123 678
    >
    > I want space for separator
    >
    > thanks for your help
    Greg Burns, Sep 8, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sylvain Munaut

    Personnal type as port

    Sylvain Munaut, Jul 31, 2004, in forum: VHDL
    Replies:
    1
    Views:
    496
    Allan Herriman
    Jul 31, 2004
  2. david
    Replies:
    7
    Views:
    11,668
    Ricardo Dominguez
    Oct 10, 2012
  3. Replies:
    5
    Views:
    929
    X-Centric
    Jun 30, 2005
  4. darrel
    Replies:
    4
    Views:
    810
    darrel
    Jul 19, 2007
  5. jobs

    int to numeric numeric(18,2) ?

    jobs, Jul 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    956
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Jul 22, 2007
Loading...

Share This Page