I copy this from somewhere but this is used in VB, so I decided to move it into .NET, hopping there won't be errors but...
So anyone can show me the light?
VB Code:
Dim str As String Dim WordPos As Long Dim MyTextLeft As String Dim MyTextRight As String WordPos = InStr(TextBox1.Text, "06:00 AM") MyTextLeft = [color=red]Left[/color](TextBox1.Text, WordPos - 1) MyTextRight = Mid(TextBox1.Text, WordPos + Len("07:00 AM"), Len(TextBox1.Text) - WordPos + Len("07:00 AM")) TextBox2.Text = MyTextLeft & MyTextRight
Basically the commands is to take the words before "06:00 AM" and words after "07:00 AM" and put them together in TextBox2..




Reply With Quote