当前位置: 动力学知识库 > 问答 > 编程问答 >

date - SAS intck function return wrong

问题描述:

Couldn't figure out why the intck function return wrong days. Any clue?

Thanks!

data b;

WeddingDay='14FEB2000'd;

Today='28MAR2000'd;

daysMarried=INTCK('day',WeddingDay,today());

format WeddingDay Today date9.;

run;

proc print data=b; run;

1 14FEB2000 28MAR2000 5659

网友答案:

Use INTCK function to calculate the number of days between two dates.

data want;
   WeddingDay = '14FEB2000'd;
   Today = '28MAR2000'd;
   daysMarried = INTCK('day',WeddingDay,today);
   format WeddingDay Today date9.;
run;
分享给朋友:
您可能感兴趣的文章:
随机阅读: