Different countries use different number formatting standards. In order to convert numbers to these formats, finding the best suitable method would be time consuming. Additionally, for calculation purposes, these formatted numbers should be converted into software supported data types such as Double or Int for processing. Such conversion would usually take place by either replacing thousand separators and decimal separators or by following a different approach such as the use of CDBL function of vb.net. However, these approaches do not support all the world recognized number formats and would require some amount of error handling to convert the numbers accurately when handling multiple number formats.
This package is formed of two activities:
Activity that allows the user to seamlessly convert any number to any world recognized number format.
Activity that converts any formatted number to software supported number format such as Double.
The supported number formats are as follows:
fr-FR - # ### ###,00
en-US - #,###.##
en-IN - #,##,##,###.00
de-DE - #.###.###,00
ja-JP - #,###,###.00
The activity that converts the number to this format would require two inputs. The number to be converted and the format that the number should be converted to. The required format should be mentioned as listed above. For example: format should be given as "en-US". By default, it converts the number to "en-US" format. If the user wishes to convert to a different format, the required format should be provided.
The activity that converts any formatted number to software friendly Double format accepts any format. This includes formats that are not listed above as well. The activity that converts formatted numbers to Double require two inputs. The formatted number and the decimal separator that is used in the format. Since different countries use different decimal and thousand separators, it is important that we provide the decimal separator so that the code behind knows how to accurately convert the number. The code behind handles this conversion through a series of error checkings to make sure the final output is accurate.
Error messages to know of for removing formatting:
The provided Decimal Separator does not exist in the current number format.
The provided Decimal Separator does not match with the current numeric format.
Failed to convert the formatted number to Double (Critical error).
If either of the first two error messages pops up, make sure you have provided the correct inputs for the activity that converts the formatted number to Double.
No prerequisites are needed to use this activity.
Easy conversion of numbers to any world recognized number format.
Easy conversion of numbers from any world recognized number format to software process friendly format such as Double or Int.
Efficient conversion methods.
Tested error handling mechanisms to make sure the output is accurate.