I appreciate your help. I am getting closer to the answer with your help. I have used the IF statement and converted the dates to a numeric value. But I have hard-coded the start and end dates. Is there a way to pull that data into this set of code? Data apps;
VAR_AY1_Start_Date = input ('2019-01-01', yymmdd10.);
VAR_AY1_End_Date = input ('2019-12-31', yymmdd10.);
VAR_AY2_Start_Date = input ('2020-01-01', yymmdd10.);
VAR_AY2_End_Date = input ('2020-12-31', yymmdd10.);
VAR_AY3_Start_Date = input ('2021-01-01', yymmdd10.);
VAR_AY3_End_Date = input ('2021-12-31', yymmdd10.);
Set work.query_applications;
Var_Appl_Date = input(Appl_Date,yymmdd10.);
Length NEW_AY_DESC $15.;
IF VAR_Appl_DATE >= VAR_AY3_Start_Date AND VAR_Appl_DATE <= VAR_AY3_END_Date THEN NEW_AY_DESC = 'AY3';
Else IF VAR_Appl_DATE >= VAR_AY2_Start_Date AND VAR_Appl_DATE <= VAR_AY2_END_Date THEN NEW_AY_DESC = 'AY2';
Else If VAR_Appl_DATE >= VAR_AY1_Start_Date AND VAR_Appl_DATE <= VAR_AY1_END_Date THEN NEW_AY_DESC = 'AY1';
ELSE NEW_AY_DESC = 'FALSE';
RUN;
... View more