Configuring point and comma decimals in Jhipster - jhipster

Let's say I have a Price field/atribute for an entity that I need to show with a point in the English version (9.5) and a comma in the Spanish version (9,5). Now, no matter in what language I select the app, it always shows the point . for the decimal
How can I change to comma decimal point in Jhipster?
Thanks

Related

excel power query transforming data from text to decimal

Howto transform a colum with postive and negative values, which is loaded as text into a column with decial values without errors. the minus sign seems to make the error:
I use a german version of excel 365 on windows 10
Finally solve the problem: It was q quircky minus-sign, which had to be replaced by a standard minus sign before changing type to decimal. Unfortunatley at first sign this quirky decimals looked like nomral ones

Excel bug: TEXT function doesn't work to extract day name depending on region

How to compute day name from date in Excel?
Please don't say it is TEXT(...,"ddd") because it doesn't work
Another screenshots for non-believers:
Complete formula just doesn't work too:
This is some problem with locale processing. Although my Windows in English, my region is Russia and Excel uses it in some strange places:
TEXT(...,"ddd") ( or TEXT(...;"ddd") . as required )
does work, provided you either SUBSTITUTE the dots . in your data for recognisable date separators first (eg /) or apply Find/Replace for that purpose. Though having done either (perhaps working on a copy) no formula is necessary since merely a Custom format of:
dddd
(long form, or ddd short) should be sufficient.
Note that without indication of the century Excel will guess which and not give you the right answer for a date such as 11.11.1911 (Armistice Day, a Saturday) represented in text as 11.11.11.
With string parsing you would need to be careful whether 10.08 represents October 8 on your system, or August 10.
We can always manually build one : =if(WEEKDAY(A1,2)=7,"Sunday",if(WEEKDAY(A1,2)=6,"Saturday",if(WEEKDAY(A1,2)=5,"Friday",if(WEEKDAY(A1,2)=4,"Thursday",if(WEEKDAY(A1,2)=3,"Wednesday",if(WEEKDAY(A1,2)=2,"Tuesday",if(WEEKDAY(A1,2)=1,"Monday","")))))))
[^_^]

How to put comma in a number excel

I have two numbers : 7,8 and 6,8.
When I multiply these numbers I get #VALUE!. I know, this happens because excel thinks, these numbers are strings because of the comma. But i cannot use separator . (point) because in my task, numbers are with , (comma). I tried different number functions, but all of them converts numbers with point (eg. 7.8 , 6.8). What I need to do? Thanks for advices.
To multiply them as whole numbers, use:
=SUBSTITUTE(A1,",","")*SUBSTITUTE(B1,",","")
to display 5304. To multiply as decimal fractionals, use:
=SUBSTITUTE(A1,",",".")*SUBSTITUTE(B1,",",".")
to display 53.04
Go to Advanced Options
Deselect "Use System Separators"
Fill in comma for decimal and space for thousands
Now you can do it:
This will make the change for all Excel documents.
An alternative, which will make the change throughout your system, would be to change your Windows Regional settings the same way. Be sure to change both number and currency if you do that.

Why does Excel parse numbers with more than two decimal places as whole numbers?

Excel uses Windows Regional Settings to get the List Separator and Decimal Separator for csv files. I am attempting to localize some csv reports in our application for French and German users. I am using semi-colons as the csv delimiter and commas as decimal separators for the French and German versions of each csv.
I've set my local Windows Regional settings to use semi colons and commas as decimal separators. When I open the following test file in Excel, Excel parses numbers with 2 or less decimal characters correctly ... based on my Regional settings. However, numbers with 3 or more decimal places are parsed as whole numbers. So, the string 12,3000 will be parsed as 123 000 (One hundred twenty three thousand).
test.csv:
"Decimal Separator";"In Quotes";"Number"
"Period";"false";4.283333
"Period";"true";"4.283333"
"Period";"false";0.283333
"Period";"true";"0.283333"
"Comma";"false";4,283333
"Comma";"true";"4,283333"
"Comma";"false";0,283333
"Comma";"true";"0,283333"
"Period";"false";4.333
"Period";"true";"4.333"
"Period";"false";0.333
"Period";"true";"0.333"
"Comma";"false";4,333
"Comma";"true";"4,333"
"Comma";"false";0,333
"Comma";"true";"0,333"
"Period";"false";4.28
"Period";"true";"4.28"
"Period";"false";0.28
"Period";"true";"0.28"
"Comma";"false";4,28
"Comma";"true";"4,28"
"Comma";"false";0,28
"Comma";"true";"0,28"
"Period";"false";4.4
"Period";"true";"4.4"
"Period";"false";0.4
"Period";"true";"0.4"
"Comma";"false";4,4
"Comma";"true";"4,4"
"Comma";"false";0,4
"Comma";"true";"0,4"
"Period";"false";4
"Period";"true";"4"
"Period";"false";0
"Period";"true";"0"
"Comma";"false";4
"Comma";"true";"4"
"Comma";"false";0
"Comma";"true";"0"
"Period";"false";45623455454.283333
"Period";"true";"45623455454.283333"
"Period";"false";45623455450.283333
"Period";"true";"45623455450.283333"
"Comma";"false";45623455454,283333
"Comma";"true";"45623455454,283333"
"Comma";"false";45623455450,283333
"Comma";"true";"45623455450,283333"
"Period";"false";45623455454.28
"Period";"true";"45623455454.28"
"Period";"false";45623455450.28
"Period";"true";"45623455450.28"
"Comma";"false";45623455454,28
"Comma";"true";"45623455454,28"
"Comma";"false";45623455450,28
"Comma";"true";"45623455450,28"
Does anyone have any insight on this
You might have this issue if your Regional settings are set to use a comma as the "Digit grouping symbol". French uses a space character for Digit Grouping and Germany uses a period.
Windows --> Control Panel --> Region and Language --> Numbers --> Additional Settings --> Digit Grouping Symbol --> Set to use a space character
I'm thinking that you have the digit grouping symbol also as a comma. That's usually represented by a period (or a space) in Europe, so three thousand and twenty-two hundredths would be represented 3.000,22.
I changed the decimal character to a comma, and the digit grouping character to a period, and imported 12,3000, and Excel interpreted it as twelve and three tenths, as it should.
When I changed both to comma, the same import gave me one hundred twenty-three thousand, as you saw.

Currency summation in Lotus Notes

We have designed the LN forms with editable fields.User enters the amounts in the editable fields. We are converting the these amounts to currency using 'CCur'. The actual issue is user enters the amounts with decimal separator either as comma(,) or dot(.). When converting the amounts to currency it is not considering the decimal and thousands separator.
Example:
User enters amounts as below: Amount1 = 2090,Amount2 = 1500,90 and Amount3 = 800
In the current case the TOTAL AMOUNT is calculated as 152980.00 which should be 4390.90
How can I achieve this? Do we have user specific settings in LN which automatically takes care such things?
Regards,
Kishore
It sounds like your currency formats may not be set up correctly, and thus the locale of the client being used to enter the value 1500,90 is one that assumes the comma is a thousands separator, and the period is a decimal separator.
Here is one section of the documentation to check-out. You may need to confirm the field settings on the form to see if a custom currency format has been specified. Otherwise, see what the user preferences of the client says
For this question, I am not clear that why are you using comma as a decimal separator, I guess that it is not a formal way for storing the currency value. I can understand. this is your requirement. Just Take this as a suggestion. Okay We have the field property, First you change the field type as Number. And set the field control property, Number format is as currency and Change the User preference as Custom. There you can find two kind of settings enabled. Here you change the thousand separator into a different symbol. But I guess that you can not give multiple separator for decimal or thousands. Also If you give the same symbol for both things. It will be conflict.
My opinion- Based on your requirement, You do replace the comma with dot before applying the Ccur().
#Ramkumar: I don't agree. Set the field settings to Numeric and "User settings", not "custom". The users need to use the correct decimal point, if they are in a country where a period is used for decimal point, they use that, if they are in a country where they use comma as decimal point, they use that.
Kishore, you could add a field validation on the numeric field to make sure the value is numeric.
Use #IsNumber for this.

Resources