Jump to content
Server Maintenance This Week. ×

Trim first and last two characters


This topic is 2412 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Trying to trim characters from both the left and right of a value in one field. There are no breaks or symbols within the value.

For example, the following value is in my "full_ticket_number" field:

2900686073681910

In a separate calc field I need to have the "29" from the left and the "0" from the right removed to provide the value:

0068607368191

In this example, the "29" and the "0" seem to be some sort of control character placed there by the issuer, which have no use for me in my solution.

Of course the value is unique for each record so I can't just have the calculation look for certain characters to apply the function to. I've tried to combine both the Left and Right functions, but FM is providing errors I can't seem to solve.

Advice much appreciated!

Link to comment
Share on other sites

3 minutes ago, madman411 said:

I've tried to combine both the Left and Right functions

Try the Middle() function:

Middle ( full_ticket_number ; 3 ; Length ( full_ticket_number ) - 3 )

If all ticket numbers have the same length, you can shorten it to:

Middle ( full_ticket_number ; 3 ; 13 )

 

  • Like 1
Link to comment
Share on other sites

This topic is 2412 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.