Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

splitting string 1

Status
Not open for further replies.

DrHabi

Technical User
Jan 22, 2002
103
US
I wasn't able to search and see if this has been asked before so sorry if it has. I need to split a string and get only two numbers out if. The field string looks like this:

ZMC CREW HD TSU-YYZ/YVR/YUL:Qty from 106 to 80
the text before the ':' will change in length but the rest stays the same except for the numbers which I need to grab both and use in calcs
thanks
 
For the first number use this formula:

val(extractstring({table.string},"from ", " to"))

For the second number use:

stringvar array x := split(trim({table.string})," ");
val(x[ubound(x)])

-LB
 
great! Thanks for the help and have a good one!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top