标题: today() function problem [打印本页] 作者: shiyiming 时间: 2012-3-22 03:31 标题: today() function problem data a;
today1=today();
today2=today();
format today1 datetime20. today2 date9.;
run;
I run the code aboce, and got two different values:
today1 is 1960, however, today2 is correct.
what is wrong with it?
thanks.作者: shiyiming 时间: 2012-3-22 17:51 标题: Re: today() function problem 实际上你在用不同的日期格式时要知道,yymmdd格式是计算一个日期到1960年1月1号的天数作为存储数字,同样datetime是计算一个日期到1960年1月1号0点0分0秒的总的秒数作为存储数字,所以同一个数字用两个format展示是完全不同的概念。作者: shiyiming 时间: 2012-3-22 20:43 标题: Re: today() function problem yes .I got it!