By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
It can be modifed for any other format you wish.
PhoneNbr := CustomerPhone1;
FIELD CustomerPhone1 := CustomerPhone1;
Len := @Length(PhoneNbr);
newPhone := @If( Len = 7 ; @Left(PhoneNbr ; 3) + "-" + @Right(PhoneNbr ; 4);Len
= 10; "(" + @Left(PhoneNbr ; 3) + ") " + @Middle(PhoneNbr ; 3 ; 3 ) + "-" +
@Right(PhoneNbr ; 4); PhoneNbr);