LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 May 2003 09:35:52 -0500
Reply-To:   JRW <JRW5@COMCAST.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   JRW <JRW5@COMCAST.NET>
Subject:   Splitting the diff between two dates into monthly records

I have two variables in a record: StartDate and an EndDate, but may also have some intermediate dates (e.g. IntermediateDate1, IntermediateDate2, etc). I want to take the difference between the two dates (StartDate and EndDate) and create a dataset with individual records identified by month.

Example: Start Date=2/20/03 IntermediateDate1=6/1/03 IntermediateDate2=8/12/03 EndDate=10/20/03

Can someone supply the SAS code to create an output dataset with the nine individually monthly records that are structured as follows: I want all four dates from above on each record too.

2003 Feb 2003 Mar 2003 Apr 2003 May 2003 June 2003 July 2003 Aug 2003 Sep 2003 Oct

Thanks, J


Back to: Top of message | Previous page | Main SAS-L page