Comma instead of decimal point

Is there a global way to doubles and floats to use a comma instead of a decimal point (like we do in Europe) when output as a string? (as opposed to having to reformat each number individually every time I want to display it)

Kramis wrote:
Thanks. Writing code internally is no problem with a dot. Will the locale of my computer determine the string output style automatically?I'm not sure what exactly to change on your PC to make that happen, but yes, I believe you can do this. This varies on every OS, of course, but you should look into your OS's country- and/or location settings.
Kramis wrote:
... but then I assume I have to use it every time I output to a string with each individual number.That is correct.
Kramis wrote:
... I was hoping for a more global method.You could place the formatter(s) in a separate class and invoke them from there: no need to create new formatter(s) every time you want to display a number. But you will have to do yourFormatter.format(aDouble) every time though.

Similar Messages

  • Windows Service - While converting into decimal its takes comma instead of decimal point

    Hi,
    We are converting hex value into decimal in windows service application ,  its working fine in almost all PC's except one.
    When we are using same code/windows service in French PC, while converting hex value into decimal its going wrong ( Ex : 1256,8904 instead of 1256.8904 )  that's is instead of decimal point takes comma. We executed same code in sample win
    form on same PC its working fine.
    actual value is "1256.8904" but its converting into "1256,8904". Can you please give me some idea how to resolve this.
    Regards,
    Prabhu.R
    Prabhu.R

    Hi,
    This forum is for System Center Service Manager. I bet you will have better luck in getting an answer if you find a forum that suits your question better. :)
    Regards
    //Anders
    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se

  • Comma is showing in place of  decimal point  ( smartform)

    Dear All
    When i try to display quantity or amount field with decimals in smartform report,  system is displaying comma instead of decimal point. for e.g 1200.50 is displayed as 1200,50.
    Please advice.
    Ravindra Suvarna

    posting part of the code for your verification. Pls let me know is you need any further information.
    Form Interface
    IS_BIL_INVOICE     TYPE     LBBIL_INVOICE
    IS_NAST          TYPE     NAST
    IS_REPEAT     TYPE     NA_REPET
    Global Definitions
    WA_EXCISE     TYPE     LBBIL_HD_KOND-KWERT
    WA_CESS          TYPE     LBBIL_HD_KOND-KWERT
    WA_CST          TYPE     LBBIL_HD_KOND-KWERT
    WA_TCS          TYPE     LBBIL_HD_KOND-KWERT
    WA_FREIGHT     TYPE     LBBIL_HD_KOND-KWERT
    WA_INVVAL     TYPE     LBBIL_HD_KOND-KWERT
    WA_ITMVAL     TYPE     LBBIL_HD_KOND-KWERT
    WA_RATE          TYPE     LBBIL_HD_KOND-KWERT
    WA_EX_WORDS     TYPE     CHAR_200
    WA_IN_WORDS     TYPE     CHAR_200
    WA_NUM_CHR     TYPE     CHAR_18
    WA_VTTK          TYPE     S_VTTK
    TOT_NETWT     TYPE     PNUM
    TOT_GRSWT     TYPE     PNUM
    T_NETWT          TYPE     PNUM
    initialization
      PERFORM CHECK_INVOICE USING  IS_BIL_INVOICE
                            CHANGING WA_EXCISE
                                     WA_CESS
                                     WA_CST
                                     WA_TCS
                                     WA_FREIGHT
                                     WA_INVVAL
                                     WA_ITMVAL.
    Form Routines
    FORM check_invoice USING is_bil_invoice TYPE lbbil_invoice
                       CHANGING wa_excise   TYPE lbbil_hd_kond-kwert
                               wa_cess     TYPE lbbil_hd_kond-kwert
                               wa_cst      TYPE lbbil_hd_kond-kwert
                               wa_tcs      TYPE lbbil_hd_kond-kwert
                               wa_freight  TYPE lbbil_hd_kond-kwert
                               wa_invval   TYPE lbbil_hd_kond-kwert
                               wa_itmval   TYPE lbbil_hd_kond-kwert.
      DATA : wa_kond TYPE lbbil_hd_kond.
      DATA : wa_ikond TYPE  lbbil_it_kond.
      CLEAR wa_excise.
      CLEAR wa_cess.
      CLEAR wa_cst.
      CLEAR wa_tcs.
      CLEAR wa_freight.
      CLEAR wa_invval.
      CLEAR wa_itmval.
      LOOP AT  is_bil_invoice-hd_kond INTO wa_kond. "header sub total
        CASE wa_kond-kschl.
          WHEN 'JEXP'.
            wa_excise = wa_excise + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'JECP'.
            wa_cess   = wa_cess   + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'JLST' OR 'JCST' OR 'JIVC' OR 'JIVP'.
            wa_cst    = wa_cst + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'ZTCS' OR 'ZTCX' OR 'ZENT' .
            wa_tcs    = wa_tcs + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'ZFRC'.
            wa_freight = wa_freight + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
        ENDCASE.
      ENDLOOP.
      LOOP AT is_bil_invoice-it_kond INTO wa_ikond. "item value
        wa_itmval = wa_itmval + wa_ikond-kwert.
      ENDLOOP.
      wa_invval = wa_invval + wa_itmval.
      IF wa_invval NE  is_bil_invoice-hd_gen-bil_netwr.
        MESSAGE e002(sy) WITH 'Invoice total Error. Pls Check the Pricing Conditions'.
      ENDIF.
    ENDFORM.                    "check_invoice
    Display
    &WA_ITMVAL(11.2)&
    &WA_EXCISE(11.2)&
    &WA_CESS(11.2)&
    &WA_CST(11.2)&

  • IN sharepoint 2013 custom list number type column ,decimal point shown as comma

    i have a sharepoint 2013 site in which a custom list is there. In number type field while i enter decimal number, instead of decimal point comma is comming. Any help appreciate
    Thanks sanjay

    Hi SanjayPradhan,
    According to your description, my understanding is that when type decimal point in number field, it became comma.
    I made a test in my enviroment and it works like a charm.
    Did you have some formula in that column ?
    If yes, I suggest you can check the formula in list settings->columns.
    If No, I suggest you can recreate a new list and number field to test whther it works.
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How do I Change decimal comma for decimal point

    Hello,
    I have an external USB keyboard and I don't know how do I change the decimal comma for the decimal point.
    I already set my region but anyway I can't change the decimal comma for the decimal point.
    thanks

    Thanks for the link, that help me a lot, because now when I'm in excel or a calculator I hit the point key on the numeric part of my keyboard and I get a point, but when I'm in word, safari or entourage and I hit the point key on the numeric part of my keyboard I get a comma instead a point.
    I have a windows Spanish ISO extended keyboard.
    Thanks a lot for your help

  • Problems with the Scanner class and the decimal point

    I'm creating a GUI so to get the user input (double value) I use a jText field and the Scanner to read that value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = new Scanner(time).nextDouble();
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                                  The problem is that the decimal point it's a comma so if I write:
    1.2
    t = (Error InputMismatchException)
    1.236
    t = 1236.0
    1,2
    t = 1.2
    So I try using the parse method to get the double value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = Double.parseDouble(time);
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                            In this case the method parseDouble() takes the dot as the decimal point so if i write:
    1.2
    t = 1.2
    1.236
    t = 1.236
    1,2
    t = (Error InputMismatchException)
    � What can I do to Scanner class to accept the dot as the decimal point?
    I think that the problem is becouse in some countries (I'm from Colombia) the decimal point is a comma and in others is the dot.
    Thanks

    From the Javadocs for Scanner:
    Localized numbers
    An instance of this class is capable of scanning numbers in the standard formats as well as in the formats of the scanner's locale. A scanner's initial locale is the value returned by the Locale.getDefault() method; it may be changed via the useLocale(java.util.Locale) method.
    If you change your locale to one of those that does use a comma for a decimal point, it should work.

  • Decimal comma instead of point for diagramm values

    hello there,
    would like to have decimal commas displayed instead of the decimal point. am using a diagramm with values displayed. the acsis' values are displayed correctly (with a decimal comma) but the additional values for the bars are not.
    am using illustrator cs4 and mac os 10 x 10.6
    thanks, schiffa11

    hello,
    settings are german, the values of the x- and y-axis is displayed properly with a comma. it's the additional values which are not displayed correctly.
    (y-axis)
    value 2,40      /////////////////////////////// value 4.21
    value 1,40      /////////////////////////////////////////////////// value 6.21
    value 0,40      /////////////////// value 2.21
                         value 0,00   value 1,00   value 2,00    (x-axis)
    but thanks!
    schiffa11

  • Comma and Decimal point

    Hi Gurus,
    I am encountering a problem regarding printout of our SOA
    Instead of the standard format of the total value (comma then decimal point (ex. 2,559.62)) output is (decimal point then comma(ex. 2.559,62)). This always happens to a particular customer only. What should I do?
    Regards,
    Jay

    Hi,
    The decimal notation of numbers in Visual Composer is based on the Locale as set in the Portal
    (User Administration -> select user (or group) -> Language)
    if language is not set, it's based on IE language, and afterwards on the OS language.
    therefore, setting a number field formatting to "LOCALE_NUM" or checking the "Local Format" checkbox in the field's formatting tab, will cause the runtime to format the number according to the above.
    Your customer is probably currently on a non US locale.
    Best Regards,

  • In a pages table change the decimal point to a comma

    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.

    Scott Fox wrote:
    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.
    I apologize but _*in many countries*_ the usual decimal separator is not the decimal point, it's the comma.
    It's time to understand that American habits aren't the universal rules or ways of life !
    I'm not saying that American habits are bad, just that they are local ones, not better than others.
    Yvan KOENIG (VALLAURIS, France) mercredi 30 septembre 2009 16:01:23

  • South America localization with comma decimal points

    Hello All:
        I am doing a simple division on a formatted search. However it is south america localization and it has the comma as decimal point instead of period. If I just do value 1 / value 2 it give me error message. if I replace , and then cast to numeric and then divide it works. But put in a trigger by formatted search it comes out as a wrong monetary value. The UDF for the FS is a quantity value. Not monetary!
        How does anyone do normal division and multiple with South America localization?
        Thank you for all the help!

    The field itself is actually a UDF of type Quantity. So using the quantity select $[$38.11.0]/$[rdr1.U_myfield]
    I suppose for checks you can just divide quantity by price or something! But it doesn't seems  to work for me!

  • Setting decimal point to "," instead of "."

    Hello
    Can any body tell me how to set format for numeric amount in order to have
    Decimal point set to "," instead of "." and thousount separator set to
    blank instead of comma in HTMLDB
    thank

    When you create an application, you can select the language of the application.
    Select the language which uses the convention you want, e.g., French (France).
    You can select the application language at:
    Home > Application Builder, Select "Create"
    Home > Create Applicaiton, Navigate Method > Name > Pages > Tabs > Shared Components > Attribute
    Once the application is created, you can specify the number format on the number type column in each page. Select the one that uses group separator and decimal point, for example, 999G999G999G999G990D00.
    You can specify the number format at:
    Home > Application Builder> your application > Page Definition > Report Attributes > Column Attributes

  • Printed cheque - comma and decimal point

    Hi,
    My company use pre-printed cheque to make payment. However, there is some error with the printed cheque. When printed, the decimal point and the comma is somehow mixed out.  
    For example, amount of $1,300.50   -   will appears as $1.300,50
    Why is this so ? How do I recrtify the problem ? It only happens to some cheque. Some are ok.
    Thanks.
    Angel.

    >
    Angel.. wrote:
    > Hi,
    >
    > My company use pre-printed cheque to make payment. However, there is some error with the printed cheque. When printed, the decimal point and the comma is somehow mixed out.  
    >
    > For example, amount of $1,300.50   -   will appears as $1.300,50
    >
    > Why is this so ? How do I recrtify the problem ? It only happens to some cheque. Some are ok.
    >
    > Thanks.
    >
    > Angel.
    Check decimal notation in SU01 / currency settings in SPRO

  • Sap Script : getting comma in place of decimal point & viceversa

    Hi experts
    In one Sap script for 2 currency fields comma is there in place of decimal point & viceversa.(But rest of currency fields are getting displayed correctly.)
    ex: 1426.88  is printed as 1.426,88
    please provide me solution as early as possible
    Thanks & Regards
    Swathi Vuddala

    Hi Swathi,
    Check this info.
    I am providing two ways with some sample code, you modify it accordingly to your code.
    THIS PROCEDURE IS BY CHANGING SETTINGS :
    In your user profile, change the decimal format you are currently using.
    System->User Profile->Own data.
    Go to defaults tab and then change your decimal notation.
    THIS PROCEDURE IS WITHOUT CHANGING DEFAULT SETTINGS:
    Report YH642_TEST.
    TABLES:
    mard.
    DATA : W_mard_labst type p decimals 3,
    w_dt1(18).
    data:
    W_N TYPE I.
    SELECT SINGLE * FROM MARD INTO MARD WHERE LABST = '10000.00'.
    WRITE: mard-labst .
    W_mard_labst = mard-labst.
    WRITE:/ W_mard_labst .
    w_dt1 = w_mard_labst .
    write W_mard_labst to w_dt1.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • JSP removing decimal points

    Hello all.
    I am developing a site and Im new to JSP. now one of the pages I am developing needs to pull data out of a MySQL table.
    I can pull the data and it is working great! BUT the particular data I am pulling is pricing information.
    The data is in the following form:
    1.4800
    thats a price so its one dollar and fourty eight cents.
    the extra two decimal points are needed by the backend software so I cant remove them from the MySQL table (plus there is like 66,000 entries in the table).
    I need to find a way to remove these with JSP some how as they are irrelevant to what we need to display. the numbers are already rounded off so that all entries end with two 0's is there an easy way to remove these two zero's?
    Just so you know my code goes something like this.
    <form>     
    <% out.println("<select name=\"select\">");
    out.println("<option selected>Please select a Country</option>");
    int iBusNo = 0;
    int i = 0;
    while(bMoreData)
    out.println("<option>" +BusDirRecordset.getString("LongName")+ " - $" +BusDirRecordset.getString("Rate")+ "</option>");
    bMoreData = BusDirRecordset.next();
    i++;
    out.println("</select>");
    %>
    </form>If you have any suggestions I'd greatly appreciate the help!

    Go to http://java.sun.com/j2se/1.4.1/docs/api
    Look up the documentation for the class "NumberFormat".
    Cut and paste (with a slight mod) from the online document:
    NumberFormat nf = NumberFormat.getInstance();
    nf.setMinimumFractionDigits(2); // cut off trailing zeroes
    nf.setMaximumFractionDigits(2); // change "1.5" to "1.50"
    for (int i = 0; i < a.length; ++i) {
        output.println(nf.format(myNumber[ i ]) + "; ");
    A neat side-effect is that it's supposed to know your local "locale" information, so if you're in Spain using commas instead of periods as the fraction separator, that's what it'll do.

  • BI7.0_WAD3.X - Pie Chart- Always shows 2 decimal point

    Hi,
    <u>Info:</u> <u> BI 7.0, Stack 10, FE 1100, WAD 3.X</u>
    <u><b>Problem 1: (Pie Chart) :</b></u> :
    a. I am unable to  make the Pie chart show percentage in one decimal point. (EG:  56.3%).
    b. The Pie chart does not have the selection to show both value & text
    <u><b>Problem 2: (Pie Chart):</b></u>
    Problem 2: The text style does not change at all ( Eg: does not change to bold, italic, does not represent diagonally)
    Please let me know if any one seen these problems or any OSS note available the above problems.
    Thankyou,
    -Sini
    Message was edited by:
            Sini Kumar

    Hi Kai,
    If I want to create a bar chart with DP that looks as follows:
    <b><u>Material       Total</u></b>
             A                    5
             B                   10
             C                     7
             D                    4
    Overall result           26
    Then How do I get the labels A, B, C, D in the Y axis  as the name of the "category" and also all the series represented in diffrent color say 5 (red), 10(yellow), 7 (blue), 4(green). I am not able to get these two criteria met?
    what I am able to achieve is either
    1. (A, B, C, D )are shows as the name of the category in the Y-axis, and (total) on X-axis-- then it will have only one series (ie total)....Hence cannot give different colors for the bar representing the category A,B,C,D
    (or)
    2.  (material) shown as the name of the category on Y-axis and (total) on X-axis and the series will have (A, B, C, D) in different colors but the name of the series will be shown anywhere inside the bar and not as the name of the category....b'cos the name of the category will be (material)
    so how do i get the ......labels A, B, C, D in the Y axis  as name of the "category" (instead of material)  and also all the series represented in different color say 5 (red), 10(yellow), 7 (blue), 4(green).
    Please let me know if this is possible with the chart wizard in 3.x or 7.0 WAD. I tried and so far no luck!
    Earlier in 3.0B it was possible by right clicking every data point to change it's color.
    Thankyou,
    -Sini

Maybe you are looking for

  • In OBIEE installation

    Hi , I installed OBIEE 10.1.3 and 7.9.5 successfully . But when I try install Informatica ..it is asking for licence key in .xml file which i didnt get in the downloaded file . I have downloaded all the software from OTN . Can anyone pls guide me thr

  • Why no sound on iTunes?

    iTunes is not working. I get no sound when playing from my iTunes library or playing a CD;  though the sound works OK if using Parallel  to run Windows XP and play it as a WMA file;  and on the Mac with other applications like Garageband. I am runnin

  • Dual 27" LED's, can the speakers work in stereo?

    I have dual 27's and it seems I can only select one LED Display Out sound port, but not both for stereo. Any chance I'm missing something, or is this just not possible for the right monitor to be the right speaker and the left monitor to be the left

  • Getting Bluetooth Stereo to Work (A2DP profile)

    IT WORKS! I was terribly disappointed to learn that Apple didn't include the A2DP Bluetooth stereo profile in the iPhone. Since A2DP Bluetooth stereo is an established and stable standard, I can't think of any reason why Apple would not have included

  • Application/x-mplayer2, application/x-mplayer2

    hi guys help please i try to watch tv in intrnet in some wep and it syas u need to download vlc and idid that and instal a plugin and is not working  help please