%macro loop;
%let i = %sysfunc(putn('01Oct2007'd,8.));
%do %until (&i >= %sysfunc(putn('31Dec2007'd,8.)));
%let i = %eval(&i + 7);
%put %sysfunc(Putn(&i,date9.));
%end;
%mend loop;
%loop;
The trick here is knowing that macro variables are strings. So in the 1st %let
statement i was litterally '01Oct2007'd instead of the numeric value 17440
Therefore adding 7 to i would not work. By converting all your dates to the numeric equivalent with %sysfunc, you are able to increment i. To write the date back out in the date format, you must convert in back to the text string .
Hope this helps
Linda