Eunmi66 Posted February 15, 2001 Posted February 15, 2001 I'm attempting to truncate a 10 digit integer(located in a text field as text) by stripping off the last 5 numbers which are always Zeros. Ultimate goal is to make it a 5 digit integer (without the zeros). Can someone point me in the correct direction. Respectfully, Eun Mi
yafreax Posted February 15, 2001 Posted February 15, 2001 the following Calc field will work if the five "0's" do not show up anywhere else consecutivly in the numbers. Substitute(NUMBER FIELD NAME HERE,"00000", "") by definition: Substitution(text, search string, replace string) Hope this helps jeremy
danjacoby Posted February 15, 2001 Posted February 15, 2001 Or: (Round(TenDigitField, -5))/100000 Lovely thing about FMP -- it's so flexible! Personally, I prefer Kurt's answer to mine, but it's nice to know you have choices. Dan
Kurt Knippel Posted February 16, 2001 Posted February 16, 2001 quote: Originally posted by Eunmi66: I'm attempting to truncate a 10 digit integer(located in a text field as text) by stripping off the last 5 numbers which are always Zeros. Ultimate goal is to make it a 5 digit integer (without the zeros). Left ( IntegerTextField, Length ( IntegerTextField) - 5 ) This will give you the text without the last 5 characters. ------------------ =-=-=-=-=-=-=-=-=-=-=-=-= Kurt Knippel Consultant Database Resources mailto:[email protected] http://www.database-resources.com =-=-=-=-=-=-=-=-=-=-=-=-=
Eunmi66 Posted February 16, 2001 Author Posted February 16, 2001 Jeremy, Capt, Dan Thanks to each of you for the input. I used the Capt's script step and it worked super. Dan, yours also worked and I took your advise and filed it for future reference. Jeremy, The zeros sometimes appear consecutively in another location in the integer, so I was unable to use your suggestion. Greatfully Eun Mi
Recommended Posts
This topic is 8951 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 accountSign in
Already have an account? Sign in here.
Sign In Now