05-14-2012 12:37 AM
I'm very new to using SAS and getting my head around the basics.
I'm working with a column which gives the dates of when our customers have made return visits. My aim is to be able to calculate how many days have lapsed between each of their recorded visits, and then find the average amongst all of those. Bearing in mind that I will need to do this for multiple customers, sorting by their customer account number.
Any help would be appreciated.
05-14-2012 01:55 AM
Possibly you can use intck function which returns the days, years and month, depending upon your requirement. Please check the below code.
input id visit1 : date9. visit2 : Date9.;
101 24dec2011 25jan2012
102 10dec2011 01jan2012