Is there a way to format a string in Progress with a specific character?
An example is showing an SSN with x's for the first 6 numbers. I've attempted to use the String function, but it does not respect the letter x being sent in with the format.
SSNString = '333224444'.
SSNString = String(SSNString, "xxx-xx-9999").
//This displays 333-22-4444 instead of xxx-xx-4444.
I don't know a way to change this format with String function.
If you want to keep only the last four digits, you can try something like this:
SSNString = '333224444'.
SSNString = "xxx-xx-" + SUBSTRING(SSNString, 6, 4).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With