sas基础系列(2)-时间差精度获取

时间:2022-05-25 08:20:56

data a;
interval='month';
start='14FEB2013'd;
end='13MAR2013'd;
months_default=intck(interval, start, end);
months_discrete=intck(interval, start, end, 'd');
months_continuous=intck(interval, start, end, 'c');
output;

end='14MAR2013'd;
months_default=intck(interval, start, end);
months_discrete=intck(interval, start, end, 'd');
months_continuous=intck(interval, start, end, 'c');
output;

start='31JAN2013'd;
end='01FEB2013'd;
months_default=intck(interval, start, end);
months_discrete=intck(interval, start, end, 'd');
months_continuous=intck(interval, start, end, 'c');
output;
format start end date9.;
run;

proc print data=a;
run;