spliting a string in three ways?

sasolini

Registered User.
Local time
Today, 20:57
Joined
Dec 27, 2004
Messages
61
hey,

Can someone pls tell me how can i split my string in three ways? I have a field in my table called (proiz) with data like "somethink1/somethink2/somethink3". Now i would need to get that data out splited like:

mystr1 = something1
mystr2 = something2
mystr3 = sometnihg3

Does anyone have an idea how to do that?

THX
 
Have a look at the split function. Here you can specify the character you wish to split your string on . The result is a 1D array that you can index through as required.
 
thx...but somehow i find a solution ...

mypos1 = InStr(mystr, "/")
mypos2 = InStr(mypos1 + 1, mystr, "/")
mystr1 = Left(mystr, mypos1 - 1)
mystr2 = Mid(mystr, mypos1 + 1, mypos2 - (mypos1 + 1))
mystr3 = Mid(mystr, mypos2 + 1)
 

Users who are viewing this thread

Back
Top Bottom