Data File Organization Column 1 = Date Column 2 = SourceActor Column 3 = Target Actor Column 4 = Verb Column 5 = AFP_Reference Inputs Source Actor code = Target Actor code By Week or By Month Sort Need to count the number of observations that meet a particular criteria: if Source Actor == A and Target Actor == B and Date > X and Date < Y Need to find out how to count the number of observations that meet a particular criteria. Use the command count if Source_Actor == 10220 & Target_Actor == 4060 & Date > Can use the %tg to set the beginning date in the data file to be the base date. Convert v1 [the date variable] to a string variable. tostring v1, generate(date_str) usedisplayformat <- Converts date to string variable -> generate datestamp = date(date_str, "19MD") <- Converts 2 digit year data to four digit 19XX data -> Generate a date variable that converts from 2 digit to 4 digit year. help dates_and_times##fcndate replace date_str = "0" + date_str if length(date_str)==5 . . . replace date_str = "000" + date_str if length(date_str)==3 <- this will place back all leading zeros stripped from the date in conversion to data file ->