# Triming off last digit in a field

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

## Recommended Posts

This should be real easy but I just cant seem to make this work. All I need is the have the last digit of a field to be trimmed off. So...

123245

123

7654

45433

would look like...

12324

12

765

4543

I've tried various combinations of Right, Replace, Middle, Substitute, etc. functions but no luck. Any Ideas? What am I missing?

Any help would be appreciated, Thanks!

Tom

##### Share on other sites

Left(mynumber; Length(mynumber)-1 )

Steve

##### Share on other sites

You can make an unstored repeating calcfield lets call it "split", with only first repetition shown containing this - I'm here guessing we're handling a 1 NF violation.

Let(theWord=

MiddleWords ( Extend ( entry ) ; Get ( CalculationRepetitionNumber ) -1; 1 );

Case(Get(CalculationRepetitionNumber)=1;

split[2] & "¶" &

split[3] & "¶" &

split[4] & "¶" &

split[5] & "¶" &

split[6] & "¶" &

split[7] & "¶" &

split[8] & "¶" &

split[9] & "¶" &

split[10];

Left(theWord;Length(theWord)-1)))

--sd

##### Share on other sites

If your field is number, and all your numbers are integers, you could also use Div ( number ; 10 ).

##### Share on other sites

This worked...

"Left(mynumber; Length(mynumber)-1 )"

Thanks a great deal!!!

Tom

##### Share on other sites

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

## Create an account

Register a new account