楼主: poetony
3639 13

[问答] 真心请教如何填充! [推广有奖]

11
denver 发表于 2012-5-15 23:30:25
jingju11 发表于 2012-5-15 09:00
如果是date值,用YEAR()获取年份。在这里你应该不关心具体的日期。其实我或许不是非常理解你的问题。京剧
Ok, I'd like to reinterate my question.
Here, when I read column "year" such as 2003, 2004......., the default is number format. My question is how to transform variable "year" into date format, at the same time, looks like 2003, 2004 but the format is date? Many thanks
Denver大家一起读Paper系列索引贴:
https://bbs.pinggu.org/thread-1430892-1-1.html

12
jingju11 发表于 2012-5-16 21:16:25
hehe. 我帮你把问题顶起来。京剧

13
denver 发表于 2012-5-17 11:49:00
jingju11 发表于 2012-5-16 21:16
hehe. 我帮你把问题顶起来。京剧
多谢
Denver大家一起读Paper系列索引贴:
https://bbs.pinggu.org/thread-1430892-1-1.html

14
zhangzachary 发表于 2012-5-17 16:46:17
denver 发表于 2012-5-15 23:30
Ok, I'd like to reinterate my question.
Here, when I read column "year" such as 2003, 2004....... ...
  1. data test;
  2. year=2003;output;
  3. year=2004;output;
  4. run;


  5. data t2;
  6.   set test;
  7.   yy=input(put(year*10000+101,8.),yymmdd10.);
  8.   format yy year4.;
  9. run;
复制代码
寒冰凤凰 My blog: http://blog.sina.com.cn/u/1058955485

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-2 09:38