Character count

Astie

Active member
Joined
Oct 20, 2005
Messages
27
Location
Holland
Programming Experience
Beginner
is it possible to make a if statement about a piece of text, but then only the 3th and 4th character?

example:

if textbox1.text.char1 & textbox1.text.char2 = 11 then
textbox3.text = "november"
end if

something like that
 
JuggaloBrotha said:
If Mid(Textbox1.Text), 1, 2) = "11" Then Textbox3.Text = "November"

wow is it that simple :) thanks mate.

but now i want to do the same but then with a dataview rowfilter. That he filters the rows where the 4th and 5th character are the same as my textbox1 in the Column "Datum".

do you know how to do that?
 
the rowfilter returns strings in the same format so all you need to do is count the number of characters to where you need to start grabbing the information from there just put that number in place of the 4 in the Mid() statment
 
Btw, Mid function has one much faster vb.net equivalent purposed to get a part/s of a string. It is called .Substring function and it accepts the start position, and the number of characters you wish to read from the start position (use it whenever you write code in vb.net)


It means
Mid = .Substring

Regards ;)
 
kulrom said:
Btw, Mid function has one much faster vb.net equivalent purposed to get a part/s of a string. It is called .Substring function and it accepts the start position, and the number of characters you wish to read from the start position (use it whenever you write code in vb.net)


It means
Mid = .Substring

Regards ;)

oke i'll use that , but i'm still not getting any futher with my dataview.rowfilter :)
 
Back
Top