# Deletes comma/ decimal seperator

Hi i have a variable ( generic value ) that contains a dynamic number. The number its eveyrthing from 0,00 - 100000,00 ( you get the idea) anyways. I am also performing a divider/math on that generic value to find a a number that i need to use later. This its been stored into a double. Problem is when i perform the divide it throws and error ( because it cant divide a generic value into a double ) thats fine, so i made i fix with `Double.Parse(M3_PRIS.ToString, NumberStyles.Currency, cultureInfoUs) / 0.65`
the problem now its that it cuts out the “comma/decimal seperator”. So example the main number its 79,10 after calculation it gives 7910. Something thats totally wrong…
How can I perform the calculation and still keep the decimal seperator

Hy @langsem,

to convert your generic value to number try the ‘Format Value’ Activity

If it works properly please like my post and mark my answer as solution, it helps me
Any questions please let me know

Regards

1 Like

could you draw up an example ? not sure if that can work :S
Because i need to perform Genericvalue / 0.65 then convert to double

Hy @langsem,
I believe you better first convert your generic value to number prior to the division, ok?

1 Like

hm.What i get first its the number from a dt, thats stored into a generic variable as a string. I then want to perform a divion on that string to find a value ( my calculation its variable.tostring / 0.65) that gives me the total number of that stored variable example 100.00 i then store it into another variable thats a double. But inside this process i would need to maintain the comma 100(,)00 else it gives wrong value

Hy @langsem,

I will work on a model and get back to you shortly

Regards

1 Like

Thank u so much, i am trying another solution in the meantime

Hy @langsem,

To get the number from the data table, you can convert it to “Double” like this:
MyValue = CDbl(row(0).ToString)

Have a look at my file, almost there

Regards
Convert_GenericValue_Number_Test.zip (28.9 KB)

1 Like

This one worked perfect m8, thanks alot !

1 Like

Very glad I could help @langsem, happy automation

The last thing I would ask you is to like all my posts in the thread!,

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.