Suppose I have an input value say, ₹1,23,987 this is given as a string value. I want the output to be ₹ and 123987 i.e. the currency symbol and the number is supposed to be separated. How to I do that? Any ideas?
Thanks in advance.
yourStr = "₹1,23,987" requiredStr = yourStr.Substring(1,yourStr.Length)
You can convert the string currency value using the below code into a decimal value.
This will support negative numbers, and will stop if it finds a second period value, thus reducing the number of strings it returns that are not valid
For Currency symbol
This works perfectly fine!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.