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 (January 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Jan 2007 15:44:12 -0800
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: Looping Over Dates
Comments: To: "Barz, Ken" <Ken.Barz@INTRADO.COM>
Content-Type: text/plain; charset="us-ascii"

Hi Ken,

One of several approachs: this one takes advantage of the DO loop incrementing by 1 and merely pushing the date to the end of the month right before the DO loop increments.

data _null_; format firstofmonth date9.; do firstofmonth = '1DEC2005'd to '1FEB2007'd; put firstofmonth=;

* your stuff here ;

firstofmonth = intnx('month',firstofmonth,0,'e'); end; run;

Hope this is helpful.

Mark Terjeson Senior Programmer Analyst, IM&R Russell Investment Group

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Barz, Ken Sent: Tuesday, January 09, 2007 3:27 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Looping Over Dates

I would like to be able to loop over a series of dates, but have the loop only look at a particular day of the month. (e.g. 1DEC2006, 1JAN2007, 1FEB2007,...)

Is there some relatively uncomplicated way to do this?


Ken Barz

Software Engineer

Intrado Metrics

Intrado Inc.

1601 Dry Creek Drive

Longmont, CO 80503

direct: 720.494.5868

pager: 303-581-7667

fax: 720.494.6600


Intrado.(r) <file:///C:\Documents%20and%20Settings\kbarz\Application%20Data\Microsof t\Signatures\>


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Intrado Inc. immediately at 720.494.5800 and destroy all copies of this message and any attachments.

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