<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to examine a date between two variables that are dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311863#M67519</link>
    <description>&lt;P&gt;Use INTNX to set the date to the end of the month. You can do this within your comparison rather than create a new variable.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2016 22:28:31 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-11-15T22:28:31Z</dc:date>
    <item>
      <title>How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311606#M67395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to analyze data involving&amp;nbsp;if there was a hospitalization (Y/N) in the first 6 months from a transplant date. &amp;nbsp;TRR transplant date is the date of transplant, SAS180 is 180 days after date of transplant, and then TRF status date is the date of follow up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to tell SAS to look at&amp;nbsp;Y/N for hospitalization if the TRF status date is between the time interval "date of transplant" and "SAS180". And remove any record if TRF status date is beyond the SAS180 date. &amp;nbsp;Does anyone know what I can do to achieve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13140iC0237385C6EEC625/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screen Shot 2016-11-15 at 12.01.32 AM.png" title="Screen Shot 2016-11-15 at 12.01.32 AM.png" /&gt;</description>
      <pubDate>Tue, 15 Nov 2016 06:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311606#M67395</guid>
      <dc:creator>chancc</dc:creator>
      <dc:date>2016-11-15T06:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311618#M67401</link>
      <description>&lt;P&gt;Can you assume you'll always have dates or do you need to account for&amp;nbsp;missing data?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyways, you can compound your conditions using an AND&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Length check $3.;&lt;/P&gt;
&lt;P&gt;if status&amp;gt;=transplant AND STATUS&amp;lt;=sas180 then check='ok';&lt;/P&gt;
&lt;P&gt;else check='bad';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can filter on your check variable. I create this variable so I can confirm my code before removing records - makes it easier to debug.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 07:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311618#M67401</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-15T07:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311708#M67447</link>
      <description>&lt;P&gt;Thanks I will give this a try!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I would want to capture if TRR Status Date was even within the same month and year of SAS 180 (if exceeds the interval by a few days, no big deal). But I feel that is too complicated in SAS? I was going to manually read it over.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 14:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311708#M67447</guid>
      <dc:creator>chancc</dc:creator>
      <dc:date>2016-11-15T14:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311862#M67518</link>
      <description>&lt;P&gt;What you suggested worked!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know if there is a way I can expand this a bit more so it is not just the 6 month SAS 180 exact date but includes the entire month of SAS180 date?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if the follow up date was 5/10/16 &amp;nbsp;and the SAS 180 date was 5/05/16, I still want that to be included...&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 22:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311862#M67518</guid>
      <dc:creator>chancc</dc:creator>
      <dc:date>2016-11-15T22:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311863#M67519</link>
      <description>&lt;P&gt;Use INTNX to set the date to the end of the month. You can do this within your comparison rather than create a new variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 22:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/311863#M67519</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-15T22:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to examine a date between two variables that are dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/313663#M68197</link>
      <description>&lt;P&gt;Set it to the end of the month instead of beginning&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 05:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-examine-a-date-between-two-variables-that-are-dates/m-p/313663#M68197</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-23T05:17:58Z</dc:date>
    </item>
  </channel>
</rss>

