Hi
I want to change the format from "abcdefghij" to "abcd.ef.ghij"
how to solve this.....????
Thanks
Changing format
Moderators: chulett, rschirm, roy
Not exactly a lot of information to work from.
Do you always need to insert a period after the fourth and sixth character in this particular 10 character string? Then simply substring it and concatenate it back together with them in place:
If that's not what you meant or needed, please feel free to post back with more information!
Do you always need to insert a period after the fourth and sixth character in this particular 10 character string? Then simply substring it and concatenate it back together with them in place:
Code: Select all
YourField[1,4]:".":YourField[5,2]:".":YourField[7,4]
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
An alternative approach is to use the Fmt() function with a mask. for example
Code: Select all
Fmt(TheString,"L####.##.####")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.