Date: Fri, 14 Mar 2003 08:55:18 -0800
Reply-To: Biff Canlett <Biff@CANLETT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Biff Canlett <Biff@CANLETT.COM>
Subject: Re: Converting Daily to Weekly data
Content-Type: text/plain; charset=ISO-8859-1
Create two new fields.
THEWEEK derived from function INTNX will define which week it is by
presenting one artificial date for each week.
RANK will define your preference for the specific day of week. For
RANK, use the function WEEKDAY in a select statement to manually
assign the rank.
After these assignments are completed in a data step, sort the data by
THEWEEK RANK, then SET by THEWEEK RANK in a data step and use IF
FIRST.RANK to select the records to keep.