Date: Tue, 13 Mar 2007 13:32:18 -0500
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: How to Fill in the missing dates ??
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
hello guys,
I have a dateset something like this
PT visdtn diff_vis 001001 3/17/2006 001001 3/27/2006
10 001001 001001 4/10/2006 14 001001 001001 001001 4/25/2006 15 001001
001001 5/19/2006 24 001001 001001 001001 6/16/2006 28 001001 001001
7/27/2006 41 001001 001001 8/18/2006 22 001001 9/11/2006 24
Now I need a dataset that has missing dates between visdtn i.e. I need to
add an record for each date inbetween the visitdates for this pt keeping in
mind about the number of days in a month ( either 30 days or 31 days ) and
when year changes I need to keep track of leap year . Can any body has an
Idea how to do it
I want my final dataset look like this
001001 3/17/2006 001001 3/18/2006 001001 3/19/2006 001001 3/20/2006
001001 3/21/2006 001001 3/22/2006 001001 3/22/2006 001001 3/23/2006
001001 3/24/2006 001001 3/25/2006 001001 3/26/2006
as I have 17th and 27th