10-30-2014 02:15 PM
Try intck to calculate number of days/months between two dates.
if intck('day',date1,date2) = 200 then do /* for days */
if intck('month',date1,date2) = 200 then do /* for months */
10-30-2014 02:37 PM
Assuming Date1 and Date2 are SAS dates would the following not work?
If (Date1 - date2) eq 200 then Do ;
For the months and years the Intck function woudl work as shown by stat@sas. Of course, we have not yet talked about 'alignment' on months and years!