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 (September 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 23 Sep 2003 13:05:25 -0400
Reply-To:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:   Re: dates issue...

The major problem seems to be: how will you distribute the rest of the data to your new periods? Repeat it? Divide it? The other thing? Something like that should do nearly what you want:

data test; start="01jan33"d; end="15mar55"d; output; start="03feb2000"d; end="15oct2003"d; output; format start end mmddyy8.; run;

data new; set test; do while (start<end); output; start=intnx("month",start,1); end; run;

On Tue, 23 Sep 2003 07:40:06 -0700, jcern <jcern15@YAHOO.COM> wrote:

>I am having trouble with date conversions for a particular function. >I have to change a single date period to multiple records of months >and years. For example, I have to change a date period of let's say, >1/1/00-3/15/01 to multiple records of: 1/00, 2/00,3/00,4/00 up until >3/01. In other words, I need the date period broken down into >month/year dates for each month and year of the time period. I >realize this is going to result in MANY records, but that is how I >have to format this, unfortunately. > >Does anyone have any idea how to go about doing this? > >Thanks!


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