Date: Fri, 22 Apr 2011 10:56:29 -0700
Reply-To: Jill Stoltzfus <jillstol@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jill Stoltzfus <jillstol@YAHOO.COM>
Subject: Re: Identifying dates within 3-month range
In-Reply-To: <201104221753.p3MG4WHP003805@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=us-ascii
Arthur, yes, that would work, and I'm going to try it using Suzanne's code.
Thanks again for the responses--I sincerely appreciate it.
Jill
________________________________
From: Arthur Tabachneck <art297@ROGERS.COM>
To: SAS-L@LISTSERV.UGA.EDU
Sent: Fri, April 22, 2011 1:53:36 PM
Subject: Re: Identifying dates within 3-month range
Jill,
You've mentioned the same problems that others have mentioned in trying to
capture such a range. The most consistent decision, as I recall, is to
capture something like +-90 days, rather than trying to define the decision
rule in terms of months.
Would that work for you?
Art
-------
On Fri, 22 Apr 2011 10:39:10 -0700, Jill Stoltzfus <jillstol@YAHOO.COM>
wrote:
>Hello everyone. I'm working with a macro to match controls to cases based
on a
>surgery date range of +/-3 months. Surgery date is in the mmddyy8. form.
I've
>been scouring the Internet looking for guidance on how best to do this, but
I'm
>not having much luck.
>
>Here's my thinking thus far: If I extract the months from each date, I'll
only
>get a crude +/- 3 month estimate that doesn't take into account the days of
the
>month. If I convert the entire date to days and use a +/- 30 day range, I
can't
>accurately account for months with 31 days.
>
>So my question is, am I even able to use the entire date (mmddyy8.) in
getting
>the most precise +/- 3 month range? If so, what's the best syntax format to
>accomplish this task?
>
>Thanks in advance.
>
>Jill
|