Date: Sat, 23 Apr 2011 10:19:22 -0400
Reply-To: Arthur Tabachneck <art297@ROGERS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@ROGERS.COM>
Subject: Re: Identifying dates within 3-month range
Dan,
The one major difference between the two in this case is that using intnx
will run slower as it will require almost twice the cpu time.
Art
------
On Fri, 22 Apr 2011 16:52:20 -0700, Nordlund, Dan (DSHS/RDA)
<NordlDJ@DSHS.WA.GOV> wrote:
>Jill,
>
>I would never argue that the intnx function isn't appropriate, but whether
it is more appropriate is more a matter of taste than anything else.
>
>d1 = intnx('day', surgery_date, -90);
>d2 = surgery_date - 90;
>
>Using the statements above, d1 and d2 will be identical.
>
>
>Hope this is helpful,
>
>Dan
>
>Daniel J. Nordlund
>Washington State Department of Social and Health Services
>Planning, Performance, and Accountability
>Research and Data Analysis Division
>Olympia, WA 98504-5204
>
>> -----Original Message-----
>> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>> Jill Stoltzfus
>> Sent: Friday, April 22, 2011 4:33 PM
>> To: SAS-L@LISTSERV.UGA.EDU
>> Subject: Re: Identifying dates within 3-month range
>>
>> Dan, it's just a date variable, so the intnx function would be more
>> appropriate.
>> Thanks for your feedback.
>>
>> Jill
>>
>>
>> ________________________________
>> From: Daniel Nordlund <djnordlund@FRONTIER.COM>
>> To: SAS-L@LISTSERV.UGA.EDU
>> Sent: Fri, April 22, 2011 4:01:54 PM
>> Subject: Re: Identifying dates within 3-month range
>>
>> > -----Original Message-----
>> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>> Jill
>> > Stoltzfus
>> > Sent: Friday, April 22, 2011 11:35 AM
>> > To: SAS-L@LISTSERV.UGA.EDU
>> > Subject: Re: Identifying dates within 3-month range
>> >
>> > Arthur, does this mean I don't first have to reference the portion of
>> > Surgery_Date in terms of day--i.e., ('day',Surgery_Date,-90)?
>> Otherwise,
>> > the 90
>> > seems arbitrary--doesn't it?
>> >
>> >
>> >
>> > ________________________________
>> > From: Arthur Tabachneck <art297@ROGERS.COM>
>> > To: SAS-L@LISTSERV.UGA.EDU
>> > Sent: Fri, April 22, 2011 2:05:39 PM
>> > Subject: Re: Identifying dates within 3-month range
>> >
>> > Jill,
>> >
>> > If you are just going to go for +- 90 days, I would skip the intnx
>> > function
>> > altogether and simply use date-90 and date+90 in stipulating the
>> range.
>> >
>> > Art
>>
>> <<<snip>>>
>>
>> Jill,
>>
>> do you mean that surgery_date is a datetime variable? If yes, then you
>> may want
>> to use the intck() function, which would use 'dtday' not 'day'. If
>> surgery_date
>> is just a date variable, then Art is correct that you only need to use
>> surgery_date-90.
>>
>> Hope this is helpful,
>>
>> Dan
>>
>> Daniel Nordlund
>> Bothell, WA USA
|