can anyone write the code to find the differences between those dates.
data arjun;
input startday:$10. endday:$10. ;
datalines;
11jan2012 30jan2012
12jan2012 30jan2012
11mar2012 30mar2012
12apr2012 30may2012
31mar2022 15may2022
31mar2022 25may2022
;
run;
data want;
set arjun;
dif=intck('day',input(startday,date9.),input(endday,date9.));
run;
data want;
set arjun;
dif=intck('day',input(startday,date9.),input(endday,date9.));
run;
Really want to get in the habit of reading dates as SAS dates and assigning your desired display format. There are several functions that work with dates, times and datetime values, and you can accomplish many analysis, reporting or graphing changes with data by changing the format of the date, time or datetime variables.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.