Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SAS数据转换_Sas - Fatal编程技术网

SAS数据转换

SAS数据转换,sas,Sas,我有字符date'yyyymmdd',希望将其转换为date9。 e、 g.“20141120”至“2014年11月20日” data _null_; format yyyymmdd $8.; yyyymmdd = '20141120'; filedate = input(input(yyyymmdd, yymmdd8.), date9.); call symput('filedate', filedate); run; %put &filedate.; 而我无法通过上

我有字符date'yyyymmdd',希望将其转换为date9。 e、 g.“20141120”至“2014年11月20日”

data _null_;
 format yyyymmdd $8.;

 yyyymmdd = '20141120';

 filedate = input(input(yyyymmdd, yymmdd8.), date9.);

 call symput('filedate', filedate);
run;

%put &filedate.;
而我无法通过上述代码实现。
谢谢。

你就快到了。。。只需将外部
input()
更改为
put()

数据为空; 格式yyyymmdd$8。; yyyymmdd='20141120'; filedate=put(输入(yyyymmdd,yymmdd8.),date9.); 调用symput('filedate',filedate); 跑 %提交日期(&filedate)。; data _null_; format yyyymmdd $8.; yyyymmdd = '20141120'; filedate = put(input(yyyymmdd, yymmdd8.), date9.); call symput('filedate', filedate); run; %put &filedate.;