omacron
Technical User
- Feb 5, 2002
- 149
Hi
I am trying to do a simple Trim command but have some problems. Here is a sample data;
XXXX123456YYYYYYYYY
note: XXXX is a constant
YYYYYYYYY is a constant
What I need to do is strip out the X's and Y's so only the numbers appear. This is what I am doing right now;
This gives me this; 123456YYYYYYYYY
I am not sure how to remove the Y's as well.
thanks
I am trying to do a simple Trim command but have some problems. Here is a sample data;
XXXX123456YYYYYYYYY
note: XXXX is a constant
YYYYYYYYY is a constant
What I need to do is strip out the X's and Y's so only the numbers appear. This is what I am doing right now;
Code:
if InStr ({Table.Field}, "XXXX") <> 0 then
Trim(Mid({Table.Field}, InStr ({Table.Field}, "XXXX") + 4))
else
Trim({Table.Field})
This gives me this; 123456YYYYYYYYY
I am not sure how to remove the Y's as well.
thanks