*
;
/*
No ready to run function that I know of. Use the intck function
to determine the number of intervals, weeks in this case, from the 1st 
day in the current year to today, the default in the macro, or to any 
date that you pass to the macro.

Remember that using the INTCK function on the first interval requested 
will return a zero, so just add 1.

Bruce Kayton
*/

   %macro week(date=today());
      year_beg=mdy(1,1,year(&date));
      week=intck('week',year_beg,&date)+1;   /* intck(interval,from,to)*/
    %mend;

*Example;

    data _null_;
      %week;          /* For current date in this case 4/8/96 */
      put week=;
      %week(date='29feb96'd);  /* For specified date. 2/29/96 */
     put week=;
   run;

/* should be result to:
WEEK=15
WEEK=9
*/

*
;