There are several ways to format a currency. See here and here for starters. These links mainly use a floating point number as the starting value for formatting the currency. In your case, you will also need to analyze (possibly also clear) the string value to make sure that it is a valid number that can be formatted for the currency. See here for a start. There are many, many other examples available from a simple Google search.
source share