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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.