%macro test;
/*
%let to_day = input(%substr("07feb07",1,2),2.);
%let to_month = %substr("07feb07",3,3);
%let to_year = %substr("07feb07",6,2);
*/
proc sql;
select ccdate, ccend_date, DM_EXCLUDE_UNTIL_DATE
INTO : cstart separated by ' ',
: cend separated by ' ',
: cexclude separated by ' '
FROM work.temp
;
quit;
/* Get the from date */
DATA _NULL_;
CALL symput('temp_from_date',PUT(&cstart+7, date7.));
RUN;
%put temp_from_date = &temp_from_date;
proc sql;
update work.test
set cycle = put(input(cycle,1.) + 1,
ccdate = &temp_from_date;
quit;
%mend test;
i know this is wrong, can anyone help? what i'm trying to do is select a date from a table. using that date i would like to add 7 days and update that same table. how is this possible?
/*
%let to_day = input(%substr("07feb07",1,2),2.);
%let to_month = %substr("07feb07",3,3);
%let to_year = %substr("07feb07",6,2);
*/
proc sql;
select ccdate, ccend_date, DM_EXCLUDE_UNTIL_DATE
INTO : cstart separated by ' ',
: cend separated by ' ',
: cexclude separated by ' '
FROM work.temp
;
quit;
/* Get the from date */
DATA _NULL_;
CALL symput('temp_from_date',PUT(&cstart+7, date7.));
RUN;
%put temp_from_date = &temp_from_date;
proc sql;
update work.test
set cycle = put(input(cycle,1.) + 1,
ccdate = &temp_from_date;
quit;
%mend test;
i know this is wrong, can anyone help? what i'm trying to do is select a date from a table. using that date i would like to add 7 days and update that same table. how is this possible?