Link to home
Start Free TrialLog in
Avatar of adypips
adypipsFlag for United Kingdom of Great Britain and Northern Ireland

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

Open in new window

SOLUTION
Avatar of rizwanidrees
rizwanidrees

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adypips

ASKER

Both approaches above work well for this many thanks.
Avatar of stevepicks
stevepicks

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)
Avatar of adypips

ASKER

OK thanks Stevepicks will use split for this.