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
Printable View
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
Should work
Code:String = String.SubString(0,2) & String.SubString(3,2)
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)
Thank you , that worksded