Right(Left([PHONE],6),3)
Here's one approach, assuming the field is a string:
Substring([FIELDNAME],3,3)
If you always want the 4-6th characters, you could use: Substring([Field1],3,3)
EDIT: @sjm beat me to the punch...
Two more options, just for kicks :)
If you always want to trim the exact same string from the left & right:
TrimRight(TrimLeft([Field1],”123”),”7890”)
If you always want to trim the same number of digits from the left & right:
RegEx_Replace([Field1],”\d{3}(\d{3})\d{4}”,”$1”)
NJ
I like it thank you.
By that logic, TrimRight([County ],' County') should work, but it trims all of the letters within the string from the right, not just the complete string. Moral: Verify.
I agree with you, but what is the solution then? If I want it only to remove a specific string segment? In your example "County" from the end of the string.
TrimRight([city],'county')