全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3843 2
2011-03-20
附件中是SAS数据。通过命令

data tem;
set tem;
mn=minute(ttime);
run;

从ttime提取取分钟数据mn,但奇怪的是,mn中的分钟数和ttime中分钟数竟然不相同,这是SAS本身的问题吗?求高手指教如何解决?
附件列表

tem.rar

大小:1.45 KB

 马上下载

本附件包括:

  • tem.sas7bdat

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-3-20 23:29:29
hill302 发表于 2011-3-20 18:12
附件中是SAS数据。通过命令

data tem;
set tem;
mn=minute(ttime);
run;

从ttime提取取分钟数据mn,但奇怪的是,mn中的分钟数和ttime中分钟数竟然不相同,这是SAS本身的问题吗?求高手指教如何解决?
I see no difference. the log attached below.

42 data _null_;
43
44 do ttime=0 to 300 by 60;
45 mn=minute(ttime);
46 put ttime= time5. mn=;
47 end;
48 run;
ttime=0:00 mn=0
ttime=0:01 mn=1
ttime=0:02 mn=2
ttime=0:03 mn=3
ttime=0:04 mn=4
ttime=0:05 mn=5
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-3-21 09:07:54
2# bobguy


一般情况下是没有区别,但是我这个数据是从excel中导出的时间数据,结果使用minute函数时,二者常常会不同,这难道是数据的问题?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群