Foundas
11-24-2008, 11:15 AM
Hi,
i am posting data to a gateway and i receive back a string from which i cut and save in my database only the results
the results begin from 3.5, 7, 10.5 etc and go onwards, 3.5 units every time
when i get the result though, it is a string and thus i cannot use the variable as a number. I divide it by 3.5 but the result is wrong. (i.e if result = 3.5 then 24.5 / 3.5 gives 70. Which is wrong as it reads 245)
I tried the CInt(strVar) and CLng(strVar) but both functions return 245 instead of 24.5
Can you please advice how i can convert the string variable into an integer value with the decimal to work as well?
thanking you in advance
i am posting data to a gateway and i receive back a string from which i cut and save in my database only the results
the results begin from 3.5, 7, 10.5 etc and go onwards, 3.5 units every time
when i get the result though, it is a string and thus i cannot use the variable as a number. I divide it by 3.5 but the result is wrong. (i.e if result = 3.5 then 24.5 / 3.5 gives 70. Which is wrong as it reads 245)
I tried the CInt(strVar) and CLng(strVar) but both functions return 245 instead of 24.5
Can you please advice how i can convert the string variable into an integer value with the decimal to work as well?
thanking you in advance