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
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!![]()
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.