Guys,
I'm trying to perform a simple task.
i have a data set with many columns. Among them two columns named: "Start" and "End".
They contain date: e.g:
ID Start End
00001 12/01/2020 15/01/2020
00001 20/01/2020 25/01/2020
00001 30/01/2020 01/02/2020
00002 02/02/2020 05/02/2020
00002 06/02/2020 03/03/2020
00003 01/05/2020 31/12/2020
00004 01/07/2020 01/08/2020
............ ................. .....................
I simply would like to count row-wise the days in the intervals and the months in the intervals of time from Start to End. I tried:
data want;
set myinput;
format start end mmddyy10.;
months_diff = intck('months', start, end);
days_diff = intck('days', start, end);
run;
But it fails. For sure I'm wrong.
Can anyone help me please? Thank you in advance