This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
there are different ways how you can trim a string.
1. Use the Trim function
* Trim(x, y): Removes the character(s) in the string y from the ends of the string x. Y is optional and defaults to trimming white space. Notice in the TRIM function examples the specified characters are trimmed. It doesn't matter what order the characters are in.
Trim("!see instructions!!!", "!")returns "see instructions"
Trim(" Test123 ")returns "Test123"
Note that here there are no numbers(positions) but characters
* TrimLeft(x, y): Removes character in the string y from the beginning of the string x. Y is optional and defaults to trimming white space
TrimLeft("** special invitation ", " *") returns "special invitation "
2. Left(x, len): Returns the first [len] characters of the string (x). If len is less than 0 or greater than the length of x, x remains unchanged.
Left("92688", 3) returns a value of "926"
3. Right(String, len): Returns the last (len) characters of the string. If len is less than 0 or greater than the length of String, the string remains
unchanged.Right("92688", 3) returns a value of "688"
4. Substring(x, start, length): Returns the substring of (x) starting at (start), stopping after(length), if provided
Substring("949-222-4356", 4, returns "222-4356"
Substring("949-222-4356", 4, 6)returns "222-43"
Substring("949-222-4356", 4)returns "222-4356"
My guess is that you want to use the left function.