Newbies SawaddiBKK Posted August 28, 2006 Newbies Posted August 28, 2006 Hi All, Cell phone numbers in Bangkok are being expanded from 9 digits to 10 digits next week, and I need a calculation (I think) to make our member database reflect that change. I need to insert an "8" after the first number (a zero). Example 01-XXX-XXXX will become 081-XXX-XXXX 084-XXX-XXXX, 086-XXX-XXXX, etc My field (Mobile) is defined as text. Seems simple enough, but it's beyond my understanding. I've been scouring the help files and trying to find something similar in these forums, but no joy. I just cannot figure what function to use to create the calculation. I've been using FMPro for a while now, but my needs have been quite simple. Thanks, Joette
Newbies SawaddiBKK Posted August 28, 2006 Author Newbies Posted August 28, 2006 Oh, wow, that was fast! And that did it! Can you tell me what it means? The 2 means the second digit? but what does the 0 mean? If I understand, I can better figure this sort of thing out in future. Maybe So helpful!
RodSierra Posted August 28, 2006 Posted August 28, 2006 Joette, below is the syntax for replace: Replace ( text ; start ; numberOfCharacters ; replacementText ) The zero indicates that a character will be added at the second location, if you wanted to replace the second character with an 8 you would set this to 1, or even higher to replace more characters. Rod
comment Posted August 28, 2006 Posted August 28, 2006 Actually, the zero indicates that zero characters will be replaced. Or, if you like, 'nothing' will be replaced by 'something' - which is another way to describe 'insert'. Thanks to Søren Dyhr for coming up with this.
Recommended Posts
This topic is 6759 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