Changing number format based opun culture

Last post 05-19-2008 6:03 AM by Bob Ross. 4 replies.

Sort Posts:

  • Changing number format based opun culture

    05-12-2008, 7:57 AM
    • Loading...
    • Bob Ross
    • Joined on 05-17-2007, 4:34 AM
    • Posts 5

    I have several pages that show tables of numeric results that can be in the form "< 0.01", "2.123123", "1231234" etc...

    I need to create a function that can take a number of any format and return the same number but formatted to the current culture.

    The trouble is I do not know what type of number I am going to be dealing with so I do not know what variable type to use. Any Ideas?

    Also most number types have a function ToString() that will accept format and provider (holding the culuture information) that will reformat the number for the specific culture.
    But again I do not know what format the number is to send as an argument.

     Any help would be greatly appreciated.

  • Re: Changing number format based opun culture

    05-12-2008, 8:29 AM
    • Loading...
    • murthysrn
    • Joined on 12-15-2006, 5:22 AM
    • Bangalore
    • Posts 211

    hi,

    execute  the culture for the English standard.

    First convert the given function to string remove any special char,symbol multiple dot(.) etc

    check for the array only with numeric that is (0,1,2,3,...9)

    make the string as numerics with may be one dot.

    then convert the numeric string into local culture. 

    and display.

     

    murthy

     

     

    Thanks & Regards,
    Murthy.
  • Re: Changing number format based opun culture

    05-12-2008, 8:29 AM
    • Loading...
    • murthysrn
    • Joined on 12-15-2006, 5:22 AM
    • Bangalore
    • Posts 211

    hi,

    execute  the culture for the English standard.

    First convert the given function to string remove any special char,symbol multiple dot(.) etc

    check for the array only with numeric that is (0,1,2,3,...9)

    make the string as numerics with may be one dot.

    then convert the numeric string into local culture. 

    and display.

     

     

     

     

    Thanks & Regards,
    Murthy.
  • Re: Changing number format based opun culture

    05-12-2008, 9:40 AM
    • Loading...
    • Bob Ross
    • Joined on 05-17-2007, 4:34 AM
    • Posts 5

    ummmm.... Thanks but that actually doesn't address the issues I was asking about at all.

    Cheers anyway though.

     

    Any ideas anyone?

  • Re: Changing number format based opun culture

    05-19-2008, 6:03 AM
    • Loading...
    • Bob Ross
    • Joined on 05-17-2007, 4:34 AM
    • Posts 5

    Can anyone help me create a function that changes all aspects of a number to a different culture format?

Page 1 of 1 (5 items)