<?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 Date Difference Criteria in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22707#M3686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All-&lt;/P&gt;&lt;P&gt;Wondering how to code the following scenario in SAS.&lt;/P&gt;&lt;P&gt;Ideally all the rows in the table should pass the below criteria for the 3 dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to create a list of ppl on whom the above criteria is not met. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BOB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2011 17:19:30 GMT</pubDate>
    <dc:creator>User123</dc:creator>
    <dc:date>2011-10-03T17:19:30Z</dc:date>
    <item>
      <title>Date Difference Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22707#M3686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All-&lt;/P&gt;&lt;P&gt;Wondering how to code the following scenario in SAS.&lt;/P&gt;&lt;P&gt;Ideally all the rows in the table should pass the below criteria for the 3 dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to create a list of ppl on whom the above criteria is not met. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BOB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 17:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22707#M3686</guid>
      <dc:creator>User123</dc:creator>
      <dc:date>2011-10-03T17:19:30Z</dc:date>
    </item>
    <item>
      <title>Date Difference Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22708#M3687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc print ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where not (COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT);&lt;/P&gt;&lt;P&gt;&amp;nbsp; var id COLL_DT REC_DT RESULT_DT;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 17:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22708#M3687</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-10-03T17:30:17Z</dc:date>
    </item>
    <item>
      <title>Date Difference Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22709#M3688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom -&lt;/P&gt;&lt;P&gt;Thanks on your promp reply.&amp;nbsp; I want the output into a dataset as I need to merge later. I think the same WHERE statment in PROC SQL can get me into a dataset. But wondering if there is an approch in Datastep that does that for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 17:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22709#M3688</guid>
      <dc:creator>User123</dc:creator>
      <dc:date>2011-10-03T17:57:27Z</dc:date>
    </item>
    <item>
      <title>Date Difference Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22710#M3689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is really no different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where not (COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to limit it to one record per person/item/whatever then you might want something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where not (COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if first.id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; keep id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 18:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22710#M3689</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-10-03T18:00:20Z</dc:date>
    </item>
    <item>
      <title>Date Difference Criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22711#M3690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have ( where=( not (COLL_DT &amp;lt; REC_DT &amp;lt; RESULT_DT)));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 18:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Difference-Criteria/m-p/22711#M3690</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-03T18:02:12Z</dc:date>
    </item>
  </channel>
</rss>

