Page 1 of 1

Converting alfanumeric with komma to numeric

PostPosted: Thu Mar 14, 2019 8:38 pm
by HarryBoy
Hi, I need to convert an alphanumeric "number" with komma in it to a numeric number. After that I will add these numeric values to a total sum.

For example (alphanumeric values) below:
0,00
10,00
6,00
0,00

Needs to be summed up to (in this case) 16.00 (numeric value).

Further, I want to skip the zero values, but I think I can manage that after they are converted to numerical values.

My main problem is how do I convert them and keep the positions (these numbers are swedish kronas).


Thanks and cheers!
Harald

Re: Converting alfanumeric with komma to numeric

PostPosted: Thu Mar 14, 2019 11:00 pm
by steve-myers
  1. "Komma" is not a valid English word. I assume you meant "comma" as in the punctuation mark. For that matter, "alfanumeric" is also not an English word. I presume you meant alphanumeric.
  2. In your example, you show a comma character as a separator to indicate to indicate a decimal fraction follows. In other words, 5,35 is equivalent to 5 35/100. Or, 5.35 as is commonly used in the United States. Is this correct?

Re: Converting alfanumeric with komma to numeric

PostPosted: Fri Mar 15, 2019 1:40 pm
by HarryBoy
Hi Steve, yes that is correct. 5,35 should be 5.35 in numeric translation. I would need a way to convert these alphanumeric characters to appropriate numerical values, then only save those higher than zero and sum them up. Easy peasy (NOT). :-)


Cheers
¨Harald