Hi I have a dataset with weekly observations for all variables. The format of "Date_week" is "mmddyy10." For every variable, I have one observation per week, but it is not necessarily the last working day of the week. I want to find out "week number" for every month. I have used following code, but it does not give me the exact week number for the dates that are not the last working day (Friday) of a week. Please guide me in this regard. Thanks. data tmp1;
set tmp;
Week = ceil( day(Date_week) / 7); run;
... View more