As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Macro dtday

From sasCommunity
Jump to: navigation, search


%macro dtday ( start = 01feb96 );
data fmtdata (keep = fmtname start end label );
     retain fmtname 'dtday' 
            start   "&start:00:00:00"dt;
do day = 1 to 31
   while (datepart(start) < intnx('month',"&start"d,1));
   end   = start + 86399;
   label = put(day,2.);
   output fmtdata;
   start = end + 1;
proc format cntlin = fmtdata;
%mend dtday;

harvesting and code polishing by:

--macro maven == the radical programmer 14:57, 23 May 2012 (EDT)