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 (August 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 24 Aug 2006 09:52:25 -0500
Reply-To:   baogong jiang <bgjiang@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   baogong jiang <bgjiang@GMAIL.COM>
Subject:   Expand one obs to mutil obs
Content-Type:   text/plain; charset=ISO-8859-1; format=flowed

Hello:

The data I have:

data have; informat from_date to_date mmddyy10.; input from_date to_date; cards; 01/01/2003 03/06/2003 05/03/2004 05/28/2004 12/07/2005 02/03/2006 04/04/2006 05/31/2006 ;

The output I needed:

01/01/2003 01/31/2003 01/31/2003 02/28/2003 02/28/2003 03/06/2003

05/03/2005 05/28/2004

12/07/2005 12/31/2005 12/31/2005 01/31/2006 01/31/2006 02/03/2006

04/04/2006 04/30/2006 04/30/2006 05/31/2006

the rule is if the inverval between from_date and to_date is serveral months, then the obs will be expanded to serveral obs.

thank you for the help,

baogong


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