|
-
July 19th, 1999, 05:30 AM
#1
converting problems
I need to convert a string into double to use it in a search expression.
The problem is that I must use the European settings (, as decimal symbol) and VB uses always the VS settings. But if I try to convert the string to double (with cdbl() ) he uses the European settings ("41,2" is converted to 41,2 and not 41.2), which gives an error in the search string ( comma in expression).
Can anyone help me with this?
-
July 19th, 1999, 06:50 AM
#2
Re: converting problems
Hi!
I have solved this problem with following code:
dim myStr$, myPos%
myStr = "12,3" 'This is your number
myPos = Instr(1,myStr,",")
mid(myStr,myPos,1) = "." 'This converts "," to "."
'Now myStr is "12.3"
Pasi Salminen
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|