kendoNumeric format without thousand delimiter - kendo-ui-angular2

How can I remove thousand separator from kendoNumeric?
For example, I would like that number 78820 (which represent Id in DB) is displayed like 78820 and not 78.820 with format="n0".

You will need to use custom numeric format in order to control the thousands delimiter
<kendo-numerictextbox
[format]="'#.##'"
[value]="5000.12"
></kendo-numerictextbox>
Here is a plunkr that demonstrates this setup:
http://plnkr.co/edit/s1xx7MiQwABu2qKKjWIj?p=preview
For more details about the predefined formats, e.g. n, p, checkkendo-intl` documentation. You can find more information about the custom numeric formats there too:
https://github.com/telerik/kendo-intl/blob/develop/docs/num-formatting/index.md

Related

Save number format by default in Excel

I would like to save number format with comma delimiter as default in Excel.
So number 123456.78 will always look like 123,456.78
How can I do this ?
Excel general number formatting is based on your locale. This contains a "Digit grouping symbol", filling this is will change your format accordingly.
Be aware this is not only done for Excel, but for every application on your computer, based on this format.
Home/Styles: Right click on Normal and select Modify
Change the Number style
from General either to Number + use thousands separator
or, if you want to use Scientific notation when over a certain amount, perhaps
[<100000000]#,##0.00;General
or whatever you want.

Netsuite Custom formula split string

I have a free-form text custom CRM field that is displayed as time that I would like to convert to a number in order to do basic arithmetic operations. The field is called {actualwork} and displays like this, 3:00. I want to divide it by a decimal number field called {custeven10} and display it in percent.
By using TO_NUMBER and SUBSTR I can convert the text to a number but the number of hours can be higher than a single digit so I don't know how to use the SUBSTR command to split my field. Right now I'm using this command but it only uses the first digit of the string.
TO_NUMBER(SUBSTR{actualwork},1,1))/{custevent10}
Does anyone know how I could separate the characters before and after the ":" into a two strings? Thank you for your time.
I used this formula to transform the text into number and separate the minutes and the hours:
(TO_NUMBER(SUBSTR({actualwork}, 1, LENGTH({actualwork})-3))+TO_NUMBER(SUBSTR({actualwork}, LENGTH({actualwork})-1,2))/60)/{custevent10}

How to extract numeric value instead of text from GuiTableControl?

I use Excel VBA to automate tasks in SAP.
Many times when dealing with GuiTableControl​ the numbers and dates are formatted as text, not values. That causes problems when users have different settings (commas and points as decimal separator, for example).
Is there a function like getcellvalue in GuiGridView?
A workaround would be to access the User Profile in System/User Profile/Own Data/Defaults to get the default format for the current user, and create a function to convert the text to a value depending on the default format.
Try declaring a variable and using the "text" property of the field from the script. For example:
myVariable = session.findById("wnd[0]/usr/tabs_blah_blah").Text
Then use the variable in Excel to populate the formulae to convert in the correct way.

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.

FIxing MS Excel date time format

A reporting service generates a csv file and certain columns (oddly enough) have mixed date/time format , some rows contain datetime expressed as m/d/y, others as d.m.y
When applying =TYPE() it will either return 1 or 2 (Excel will recognize either a text or a number (the Excel timestamp))
How can I convert any kind of wrong date-time format into a "normal" format that can be used and ensure some consistency of data?
I am thinking of 2 solutions at this moment :
i should somehow process the odd data with existing excel functions
i should ask the report to be generated correctly from the very beginning and avoid this hassle in the first place
Thanks
Certainly your second option is the way to go in the medium-to-long term. But if you need a solution now, and if you have access to a text editor that supports Perl-compatible regular expressions (like Notepad++, UltraEdit, EditPad Pro etc.), you can use the following regex:
(^|,)([0-9]+)/([0-9]+)/([0-9]+)(?=,|$)
to search for all dates in the format m/d/y, surrounded by commas (or at the start/end of the line).
Replace that with
\1\3.\2.\4
and you'll get the dates in the format d.m.y.
If you can't get the data changed then you may have to resort to another column that translates the dates: (assumes date you want to change is in A1)
=IF(ISERR(DATEVALUE(A1)),DATE(VALUE(RIGHT(A1,LEN(A1)-FIND(".",A1,4))),VALUE(MID(A1,FIND(".",A1)+1,2)),VALUE(LEFT(A1,FIND(".",A1)-1))),DATEVALUE(A1))
it tests to see if it can read the text as a date, if it fails, then it will chop up the string, and convert it to a date, else it will attempt to read the date directly. Either way, it should convert it to a date you can use

Resources