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 (April 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 22 Apr 2011 13:57:11 -0400
Reply-To:     Gabriel Rosas <rosas.gabe@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gabriel Rosas <rosas.gabe@GMAIL.COM>
Subject:      Re: Identifying dates within 3-month range
Comments: To: Suzanne McCoy <Suzanne.McCoy@catalinamarketing.com>
In-Reply-To:  <959A0CF9E065924D89F2999795B5E904A01859@STPPEX.catmktg.com>
Content-Type: text/plain; charset=ISO-8859-1

Or following Sterling's suggestion: If intnx('day',surgery_date,-90) LE surgery_date LE If intnx('day',surgery_date,90); On Apr 22, 2011 1:52 PM, "Suzanne McCoy" < Suzanne.McCoy@catalinamarketing.com> wrote: > If intnx('month',surgery_date,-3) <=surgery_date<=intnx('month',surgery_date,3) > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Jill Stoltzfus > Sent: Friday, April 22, 2011 1:39 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Identifying dates within 3-month range > > 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


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