cancel
Showing results for 
Search instead for 
Did you mean: 

removing last 2 characters from string field

Former Member
0 Kudos

I am trying to remove the last 2 characters of a string field.

there is no consistant length in the field

316R1

12364R1

i want to remove everything after R

i tried instrrev but i that didnt do it.

is there a way to say

start position1 and go the R

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

try this......

mid(str,1,len(str)-2)

Answers (1)

Answers (1)

Former Member
0 Kudos

formula,

left (field, length_formula) is the solution

the length_formula is the number of chars form left

f.i

left(field, length (field)-2)

left (field, InstrRev, field,"R")

of course a combination with Right is also possible

Former Member
0 Kudos

thanks MID did it, i always forget MID.