|
-
Mar 16th, 2010, 01:21 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] workign with 5 digit number
hi guys
I have a 5 digit number as a string. Here is an example.
12345
I want to get rid of number 3., its always 5 characters I need to get rid of the middle number which is the third character. in this example is 3.
What is the best way.
Thanks
-
Mar 16th, 2010, 01:25 PM
#2
Re: workign with 5 digit number
Should work
Code:
String = String.SubString(0,2) & String.SubString(3,2)
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Mar 16th, 2010, 01:30 PM
#3
Hyperactive Member
Re: workign with 5 digit number
Since the 5 digit number is represented as a string you can make use of the great methods in the String class. The method to look at is Remove. So here is an example:
vb Code:
Dim Your5DigitNumber as String = "12345" Your5DigitNumber = Your5DigitNumber.Remove(2,1)
-
Mar 16th, 2010, 01:31 PM
#4
Thread Starter
Hyperactive Member
Re: workign with 5 digit number
Thank you , that worksded
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
|