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 (December 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Dec 2002 09:07:56 -0500
Reply-To:     Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Subject:      Re: convert column name to variable (day of month)
In-Reply-To:  <3DF56804.8020501@bellatlantic.net>
Content-Type: text/plain; charset="iso-8859-1"

Roger Lustig wrote: > This is what arrays are for! > > data new (keep=date value); > set old; > array days (31) day1-day31; > do I=1 to 31; > if day(I) > 0 then do; > **Use other ways of getting date if you prefer; > date = mdy(month,I,year-2000); ^^^^^^^^^ > value=day(I); > output; > end; > end; > run; >

Hi Roger,

I like the solution. But since the MDY function (and I would hope all SAS date functions) is happy with a 4-digit year, I'm wondering why you would convert to a 1-digit year, thus relying on the yearcutoff option to guess the correct century? Is there some benefit to this that I am unaware of?

Kind Regards, --Quentin


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