If you want to substitute any instance af a given char with another, you can use the CONVERTSTR-command.
The syntax for that command is…
CONVERTSTR(String,FromChars,ToChars)
In your case, you would have to use it like this:
MyField := CONVERTSTR(MyField,’-’,’.’);
MODIFY();
Note!!!
This will change ANY instance of the char, so if in your case the ‘-’ can be present in other positions of the field, and they are not to be changed, then you can’t use CONVERTSTR.
If this is the case, then you have to do some more “advanced” string-gymnastics.
You’ll then need to identify the actual position of the char you want to change, and then by use of DELSTR and INSSTR do the actual replacement.