问题描述:

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;
相关阅读:
Top