split update

livetech

New member
Joined
Jan 27, 2013
Messages
1
Programming Experience
Beginner
Hi there,

I am new to this forum. I have a small doubt. I have testbox which display data from database. This data has character and number. I want to spilt character and number while updating it. How to do that? (Example of data "Mar 2012". I want to split into "Mar" and "2012")
 
Hi livetech,

Welcome to the forum. Part of the Forum etiquette is to NOT hijack other Threads for your own questions.

You must start a new Thread of your own to ask your question. You can do this by clicking Home at the top of the page, then select the Forum to post to and then click on "Post New Thread" at the top of the page.

Good luck and kind regards,

Ian
 
Thread split.
 
Many Thanks JohnH.

Hi livetech,

You can use the Split method of the String Class to split data strings by a specified character. This example shows how to split a string by the space character and then display the separate strings in a message box.

VB.NET:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    Dim strSampleString As String = "Mar 2012"
    Dim mySplitData() As String
 
    mySplitData = strSampleString.Split(" "c)
 
    MsgBox(mySplitData(0).ToString)
    MsgBox(mySplitData(1).ToString)
End Sub

Hope that helps.

Cheers,

Ian
 

Latest posts

Back
Top