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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract from string 2

Status
Not open for further replies.

gromboy

IS-IT--Management
Mar 12, 2008
67
GB
Hi,
I have field called {RES6} which has a test name and value in it. the format of the field is CA125~56
The number is what I need extracting from the string...so basically the number after the "~". TheCA125~ is always constant
I'm not so hot on these sort of things...
Any help greatly appreciated
Steve
 
This was answered in an earler post, see extracting data from a string.

split({StringField},"~")[2]

Ian
 
The only thing I would add to Ian's solution is a test to make sure that the "~" exists so you can avoid a potential error:

if instr({StringField},"~") > 0
then split({StringField},"~")[2]
else ""

~Brian
 
thankyou both...
I will remember that
Steve
 
Since you say that "The CA125~ is always constant", an alternative approach is
Code:
Right({StringField},Len({StringField}) - 6)
- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Please help. new to the forum.

Here is what I am trying to accomplish. I am trying to extract just this part from the below listed data in a descriptive field "08_December". Just the number and the name of the month. Is there a formula or code that I can use to do this and then group by that formula?

"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top