|
-
Oct 17th, 2004, 06:39 PM
#1
Thread Starter
Hyperactive Member
VAL to convert thousands...
Hello,
I'm using VAL to convert some strings into numbers, and it would appear that MS has once again implemented stupidity at the lowest level.
VAL is converting "3,000.00" to 3.0, or "6,150.00" to 6.0. In other words, since comma is not a valid number it's stopping right there. Completely ignoring the fact that a comma is a valid part of a number string in those crazy little countries like America.
Any ideas? I do NOT want to go through and put a freaking Replace() funciton everywhere in my code I use VAL.
Thanks,
Ben
-
Oct 17th, 2004, 11:20 PM
#2
Use CDbl, CInt, CDec, etc.
-
Oct 17th, 2004, 11:21 PM
#3
Or, the .NET way:
int32.Parse, and also System.Convert
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
|