使用SAS在字符串中添加连字符?

use*_*178 1 sas

我想在将数字变量转换为字符变量时在电话号码之间添加连字符.

例如:原来的是7819601330(数字),需要是781-960-1330(字符)

谢谢!

Joe*_*Joe 7

图片格式!

proc format;
picture phone
low-high="000-000-0000";
quit;

data test;
x=1234567890;
y=put(x,PHONE.);
put x= y=;
run;
Run Code Online (Sandbox Code Playgroud)