B
Bob
I'm about to convert to string and use regex, but I thought there must be
something I'm missing here that already exists.
Bob
something I'm missing here that already exists.
Bob
Bob said:I'm about to convert to string and use regex, but I thought there
must be something I'm missing here that already exists.
Bob said:324.0000 -- 324
324.0100 -- 324.01
324.0001 -- 324.0001
Bob said:324.0000 -- 324
324.0100 -- 324.01
324.0001 -- 324.0001
Bob said:Okay, you got me. It's for when I'm displaying the decimal value as a string. I
have some data being returned that comes back as datatype decimal that always
trails with 4 zeros even if the value is integer. I just wanted to chop off the
unnecessary zeros and thought a ...
oh hell.
Here it is.
Dim foo As Decimal = CDec("1.0100")
MsgBox(Format(foo, "#.####"))
thanks for kicking my brain into gear.
Bob
Bob said:Dim foo As Decimal = CDec("1.0100")
Armin Zingler said:Shorter:
Dim foo As Decimal = 1.01D
;-)
Bob said:Shorter and useless to the example!
One Handed Man said:I was not aware of this suffix method. Now I am!!
Good stuff Armin, you keep telling it, I'll keep learning it
;-D
Bob said:Shorter and useless to the example!