'guess a choice of preferred method depends on more than we know. I have often had to group information into non-equal time bands (like pre1995, 1995-2000, 2001,2002,2003, ... lastyear, months of this year).
With that requirement, I found date-type class variables in the reporting procedures needed no alteration, just to be formatted with a simple user format, like:[pre]
proc format ;
value clDate
low - '31dec1994'd = 'pre- 1995'
'1jan1995'd - '31dec2000'd = '1995-2000'
'1jan2001'd - "%sysfunc( intnx( year, "&sysdate"d, -1,e ), date9)"d =[year4.]
"%sysfunc( intnx( year, "&sysdate"d, 0,b ), date9)"d - high = [monyy7.]
run ;[/pre]Then given a sas data set with tran_date, I can get stats in this collection of un-equal time bands with something like[pre]proc tabulate data= my_tran_data missing ;
class tran_date ;
format tran_date clDate. ;
var purchase sale actual forecast ;
table ( tran_date all), (purchase sale actual forecast)
*sum=' '*f= comma11./ rts=15 ;
run ;[/pre]
use variables that are more relevant to you
PeterC
[beware untested code]