ernist 发表于 2010-1-28 13:39 
rtrtrtrtrtrt
There are a couple of ways I can think of to align the data.
1) format it to year month
2) use intnx function to align all date within a month to the first/last day of that month.
77 data _null_;
78 do date='1jan2010'd to '15jan2010'd by 5;
79 date1=intnx('month',date,0,'beginning');
80 put date / date yymmdd10. /
81 date yymm7. / date1 yymmdd10. ///;
82 end;
83 run;
18263
2010-01-01
2010M01
2010-01-01
18268
2010-01-06
2010M01
2010-01-01
18273
2010-01-11
2010M01
2010-01-01