Thousand and decimal seperators

Hi all,
I have a question I need to convert a european number (. as
thousand seperator and a , as decimal seperator) to an american
number. But I could recieve both type of numbers. So when I get an
american number delivered I want to do nothing and in case of an
european number I want to convert it.
Is there a method to determine what kind of number I'm
dealing with?
Cheers,
Rick

Hi,
When a user enters a number you can use LSParseNumber to
convert the entered value into a "real number". You can use
LSNumberFormat to format a internal value for display in a local
format.
There are also functions to parse and format dates and
currencies.
All these functions are converting values depending on the
local that is set on the page ( with a "SetLocale"-function).
To be able to parse and format these values you need to be
able to identify the local by either having a customer select his
country from a listbox / user account, or knowing that the customer
went as example to the German site, and local needs to be set to
de_DE.
cheers,
fober
(updated the example local)
Here's an example function to list all the available locals:
======================================================
<table>
<cfloop index="x"
list="#Server.ColdFusion.SupportedLocales#">
<cfoutput>
<tr>
<td>#x#</td>
<td>#GetLocaleDisplayName(x)#</td>
</tr>
</cfoutput>
</cfloop>
</table>

Similar Messages

  • Problem with thousands and decimal  separator (Excel 2000)

    Hi, i have a problem with the download option to excel 2000.
    When downloading numbers over 1000 the thousands separators change in decimal separators.
    My config is:
    Locale (location): Español - España
    User Interface Language: Español
    For example, if I have a value as 1800:
    1) in OBIEE show "1.800" (ok)
    2) in Excel 2000 show "1,8" (bad)
    If i choose Locale (location): English - United Stated and
    User interface language Español.
    1) in OBIEE show "1,800" (bad)
    2) in Excel 2000 show "1.800" (ok)
    Can someone help me solve my problem?
    I need to show the same result in OBIEE and Excel, that is, "1.800" with "." not with ",".
    Thanks

    Hi,
    The thousands separator change in the backend dind't work. (+ it only works for text input fields, not for text fields)
    Anyhow, this is how we created a workaround :
    Suppose we did this : <b>NSTR(@CREDITLIMIT,"C.2")</b>
    This resulted in the field being displayed as <i>67,234.56</i>
    The 'dirty' way to convert this to an european format is :
    <b>REPLACE(REPLACE(REPLACE(NSTR(@CREDITLIMIT,"C.2"),",",";"),".",","),";",".")</b>
    Output is <i>67.234,56</i>
    (we just replaced the '.' by ',' and vice versa)
    I still feel quite uncomfortable with this solution, but this is the only way we got it to work.
    I really hope a next patch/servivepack provided a more elegant solution for this problem... (hint hint)

  • Grouping and Decimal characters in rtf templates.

    Hi guys and girls,
    I’m really struggling with a problem here regarding the decimal characters for the prices in my output.
    I'm using XML Publisher 5.6.3.
    My goal is to control the grouping and decimal character from my template.
    The numbers in the XML data file can either be 10.000,00 or 10,000.00. The format is handled by the users nls_numeric_characters profile option.
    The output of the template shall be based on the locale and not the data generated by Oracle Reports. For example: Reports to US customers shall show the numbers in the following format 10,000.00. Reports to our European customers shall show the numbers in this format 10.000,00.
    How can I achieve this in my templates? Can it be achieved at all?
    Thank you in advance.
    Kenneth Kristoffersen
    Edited by: Kenneth_ on May 19, 2009 1:30 AM

    Hi,
    Thank you for your reply.
    The problem is that the report is generating the output based on the users profile option nls_numeric_characters.
    I have tried to override the users profile option in the before report trigger without any luck. I can alter selects so the query gets the numbers in the right format but then I would have to go through all queryes and reports which seem a bit wrong? Especially for the standard Oracle reports.
    BR Kenneth

  • How we can manage SharePoint data if we have thousands and thousands of files in a Library

    Should we archive the data. If yes? How?
    Can we create hierarchy?
    It is the case if we have thousands and thousands of files in our SharePoint.
    Also what would be the best way to query the data in this case?
    Thanks

    Yes, archiving is an option to manage huge data. However there are some best practices available to manage huge content. Proper planning and structure will provide the best results. Term Store, Taxonomy and Metadata tagging will help to have structure
    for the information. Refer to the following posts for more information
    http://talkingsharepoint.sharepoint-videos.com/tag/sharepoint-big-data/
    http://www.sharepointgeoff.com/sharepoint-archiving-%E2%80%93-defining-a-way-forward/
    http://www.colligo.com/blog/sharepoint/how-should-you-manage-the-increasing-volume-of-content-in-sharepoint/
    --Cheers

  • How to display integer values and decimal values in same column in a table

    hi 
    in my report amount column is there in that column integer values (2234) and decimal values (3562.34) 
    i want to print this values as 1000 separate as like 2,234 as integer and 3,562.34 as decimal
    but this values print like 2,234.00 as integer and 3,562.34 as decimal

    Hi akilreddy,
    Per my understanding you have an field which data type may be "float" in the DB, so it have value which format like "2234" and "3562.34" in the same column, now you want to format them differently in the report, right?
    I have tested on my local environement and you can use the expression in the custom format in the Textbox properties to do this:
    Right click the field which you want to add the format and select the "Text Box Properties"
    Select the "Number" on the left pane and using expression below in the Custom format:
    =IIF(Split(Fields!yourfieldname.Value,".").Length=2,"#,###.##",Nothing)
    Or you can just use "#,###.##" in the format.
    Preview you will go the result like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Function mudule to remove leading zeros of curreny and decimal type field

    Hi Expers,
    can any body suggest me the function mudule to remove leading zeros of curreny and decimal type  fields.
    plz do reply as early as possible.
    Thanks .....
    sunil.

    Hi,
    Use this FM CNIF_CONVERT_CURRENCY2EXT
    Import parameters               Value
    I_CURRENCY                      USD
    I_AMOUNT                        00000001233
    I_DECIMALS                      2
    Export parameters               Value
    E_AMOUNT                                           1.233,0000
    Regards
    Shiva

  • Display hex and decimal

    Hi everybody,
    I'm getting real-time data and I would
    like to know if it is possible to change the display to show the
    results in hex format and decimal, using the same display. I mean, use
    a push botton to change between them.
    Regards
     Felipe

    You can also have both in one indicator.
    For an example, have a look at this old nugget. The advantage is that you don't need any extra controls and code (such as buttons, property nodes, and associated logic).
    Message Edited by altenbach on 07-20-2009 10:49 AM
    LabVIEW Champion . Do more with less code and in less time .

  • Separate the int and decimal parts of a double var

    Hi,
    I would like to know how can I obtain the int part and decimal of a double var.
    Example:
    2.3455
    int -->2
    decimal--->3455
    Also I would like to know how I can specify the precision of the decimal part. For example: 3455 if want a 2 decimal precision--> 34
    Regards and thanks with anticipation.

    Hi all,
    I too have a way to this solve this.
    1. Convert the double into a string.
    2. Split it by . symbol, which will produce an array of two elements.( First one is integer part, another one is decimal part)
    3. Now we can easily do type casting and get two variables.
    Example:
    double base = 2.5689;
    String str = Double.toString(base);
    String[] out = null;
    out = str.split(".");
    int a = Integer.parseInt(out[0]);
    double b = Double.parseDouble(out[1]);Thanks
    Ram

  • What is the difference between number, numeric, dec and decimal

    hello
    i want to ask what is the difference betwen number, numeric, dec and decimal data types ?
    in this paper http://www.techonthenet.com/oracle/datatypes.php
    i see that there is no difference ?
    what is the trick here - why there are 4 type with one purpose?

    Generally speaking Oracle has specific names for their own data types. Additionally they support the ANSI names (as well as others) for some data types which are then converted to the equivalent Oracle data type. See the documentation for details.
    ANSI, DB2, and SQL/DS Data Types

  • Wat should be data type for  negative and decimal values (eg: -1.2222)

    What should be data type for  negative and decimal values (eg: -1.2222)

    Hi
    U can use the data type DEC while creating the DOMAIN and in the domain u  have sign check box at the left corner of the screen, click that check box , u can assign negative values for the field which refers this domain.
    REWARD IF HELPFULL
    Anees.

  • Currency and decimal

    Hi,
    First, I need to know what is the max value I can go if my field type 'CURR' with length '11' and decimal '2'.
    Second, I have 2 types of field;
    DATA:  F1 LIKE ekpo-netpr,
               F2(16) TYPE p DECIMALS 5.
    If F1 = 500.00, and F2 = F1 * 1000. How the system calculates F2 since both have different length & decimals?
    Rgds,
    Haryati

    P has a length of (2n - 1), where n is the specified length.  This is different than a data domain of type CURR defined with an output length, since that length is the actual character length (although CURR is internally type P).
    If you have a data type P defined with a length of 11 and decimal 2 means:  2(11) - 1 = 21 digits (excludes the comma).  The one that is subtracted is to store the sign (+/-).  This means a max value of 9999999999999999999.99
    When you do a calculation where the decimals differ, internally the calculation uses the maximum precision, but when it is represented it will round to the specified decimal length - which is in your case 5 decimals. (eg. 32.342321 will round to 32.34232).

  • Working on Localization - Decimal and Comma 'Decimal' Seperators

    Note: SQL Server 2008 (Do not have the PARSE and TRY_PARSE functions available from 2012.)
    Hello, I am currently working on a project to offer a localization of an existing product to other languages. This means I, unfortunately, have no say in how things were done in the past and I now have to work with what I have got.The product is a website that
    will need to accept numbers in the proper culture format. In the US we would write, '123456.78', however for the Spanish or French localization they may want to type '123456,78'. 
    Now is where the fun starts. These values will be passed to a stored procedure in their culture specific format, which will also be the regional format of the server (both will not be supported at the same time.) The issue is that T-SQL will only cast (implicitly
    or explicitly) a number in the decimal format, and it does not care what regional settings are used on the server.
    This leaves me with two options
    1) I write a stored procedure for the 'decimal' culture that makes no modifications to the input and a duplicate stored procedure that will be used when it is a culture that uses the comma format, in which a replace would be done to change the format into the
    decimal format. I would then need to rewrite the website to call the appropriate stored procedure based on language.
    2) Preferably, I could write a single stored procedure that does this dynamically based on the server's regional settings. If decimal, do nothing, if comma, perform replace. Ugly, but it would work. This leads me to..
    Is there any way to access the database server's regional setting through T-SQL to determine the number format? I suppose I could put this value in a config table then select it, however I was hoping to keep the solution dynamic.
    Any other thoughts that might help me with this?
    Thanks!

    I guess I'm confused as to why the client applications cannot do the conversion and pass the values as decimals to your stored procedures.  Some things SQL does very well, some things programming languages do well.
    Give me a day (with pay) and I think I could figure this out in TSQL.  Give me an hour with my limited .Net ability and I could figure out how to do this.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Trinidad-config.xml, number-grouping-separator and decimal-separator

    Hi,
    According to my application locale, numbers are formatted as 1.234,56
    Now I want numbers to be formatted the US flavour: 1,234.56
    Here is my trinidad-config.xml file contents:
    <?xml version="1.0" encoding="windows-1252"?>
    <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
    <skin-family>mySkin</skin-family>
    <number-grouping-separator>,</number-grouping-separator>
    <decimal-separator>.</decimal-separator>
    </trinidad-config>
    The file above is declared in the web.xml file (although I'm not pretty sure this is really necessary):
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/trinidad-config.xml</param-value>
    </context-param>
    And an example of a numerical input text:
    <af:inputText value="#{row.bindings.Salary.inputValue}" label="#{bindings.EmployeesView3.hints.Salary.label}"
    required="#{bindings.EmployeesView3.hints.Salary.mandatory}" columns="#{bindings.EmployeesView3.hints.Salary.displayWidth}"
    maximumLength="#{bindings.EmployeesView3.hints.Salary.precision}" shortDesc="#{bindings.EmployeesView3.hints.Salary.tooltip}"
    id="it5">
    <f:validator binding="#{row.bindings.Salary.validator}"/>
    <af:convertNumber pattern="#{bindings.EmployeesView3.hints.Salary.format}" />
    </af:inputText>
    Where the pattern is set at Entity Object level: Employees EO > Salary attribute > UI Hints > Format: #,##0.00
    But it doesn't work. I don't know what I'm missing... Please, help!
    JDev 11.1.1.3.0

    Hello. With my application locale, numbers are formatted as 1234,56
    But i need 1 234.56 format.
    To achieve this, I use trinidad-config.xml, that contains few options:
    <?xml version="1.0" encoding="windows-1251"?>
    <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
    <skin-family>mySkin</skin-family>
    <number-grouping-separator> </number-grouping-separator>
    <decimal-separator>.</decimal-separator>
    </trinidad-config>
    On my page i use af:outputText with af:convertNumber as shown below:
    <af:outputText value="1234567,890" id="ot2">
    <af:convertNumber currencySymbol="USD" minFractionDigits="2"
    groupingUsed="true" type="currency"
    maxFractionDigits="2"/>
    </af:outputText>
    Output: *1 234 567,89 USD*
    Why decimal separator hasn't changed?
    Byt the way. With convertNumber type "percent" output will be *1 234 567.89%*

  • 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,

  • Query to display integer and decimal and integer in the same column

    Hello , 
    Have a question, 
    is there a easier way to do this.. is the question
    i have a column called units.. and i need to display either a integer in it if the value does not have any value after the decimal point .. so it shud be display as integer. But if it is a float then only display it with decimal values
    like 
    Units
    100
    .123
    1000.55
    2000

    Check this out although formatting needs to be done in the client application:
    DECLARE @t TABLE (units FLOAT)
    INSERT INTO @t (units)
    VALUES (100)
    ,(.123)
    ,(1000.55)
    ,(2000)
    SELECT units
    ,convert(VARCHAR(30), units) AS DisplayOnly
    FROM @t
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

Maybe you are looking for