## Converting alfanumeric with komma to numeric

Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

### Converting alfanumeric with komma to numeric

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
HarryBoy

Posts: 8
Joined: Tue Dec 11, 2018 2:24 pm
Has thanked: 0 time
Been thanked: 0 time

### Re: Converting alfanumeric with komma to numeric

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?
steve-myers
Global moderator

Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

### Re: Converting alfanumeric with komma to numeric

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
HarryBoy

Posts: 8
Joined: Tue Dec 11, 2018 2:24 pm
Has thanked: 0 time
Been thanked: 0 time