adypips
asked on
How do I separate the firstname for the lastname? firstname.lastname
At the moment my application stored the userlogin which is made up of the firstname.lastname how do I separate these out to get firstname lastname?
firstname.lastname
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if there is the . in all records then try split. if there is the space or a capital letter you could also split
example:
Dim userlogin As String = "first.second"
Dim arrData As Array
arrData = userlogin.Split(".") 'userlogin.Split(userlogin , ".")
Dim firstname As String = arrData(0)
Dim lastname As String = arrData(1)
MsgBox(firstname & " " & lastname)
example:
Dim userlogin As String = "first.second"
Dim arrData As Array
arrData = userlogin.Split(".") 'userlogin.Split(userlogin
Dim firstname As String = arrData(0)
Dim lastname As String = arrData(1)
MsgBox(firstname & " " & lastname)
ASKER
OK thanks Stevepicks will use split for this.
ASKER