My SQL Script return Decimal values with "," instend of "."
In my country is corect (Greece) but in VB doesnt.
Can I change that without changing the regional settings
Why isn't it working? The returning result (variable a) is a string. It must be convered to a single or double precision number in order to use it for calculations.
makisbest, I've seen three posts from you related to this subject (each one with a slightly different question) and it isn't clear to me what you're trying to accomplish with this. TipGiver's code DOES work. When you say that it doesn't work, I suspect you mean that you're trying to apply it in a way that doesn't work.
Perhaps we can help you better if you explain what you're doing, and provide the related code that you are using. (Please try NOT to submit unrelated code; it's hard for people to look through 1000 lines of code to find the area that you're having trouble with.)
you could use the format function! In immediate window type
?Format("6124,35", "#,##0.00") - Press enter
6.124,35
So even our regional settings use comma for decimals,
format uses dot for decimals and comma for thousands. This way numbers are well accepted in a mdb using vb code even in our visual formating.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.