<?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: delete observation occurred after a specific date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407585#M99338</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;&lt;BR /&gt;if date gt '01Oct2006'd then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Oct 2017 09:28:40 GMT</pubDate>
    <dc:creator>ShiroAmada</dc:creator>
    <dc:date>2017-10-26T09:28:40Z</dc:date>
    <item>
      <title>delete observation occurred after a specific date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407584#M99337</link>
      <description>&lt;P&gt;id date&lt;/P&gt;&lt;P&gt;1 01/01/2005&lt;/P&gt;&lt;P&gt;2 01/02/2006&lt;/P&gt;&lt;P&gt;3 01/01/2007&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to delete any observation after 10/01/2006&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id date&lt;/P&gt;&lt;P&gt;1 01/01/2005&lt;/P&gt;&lt;P&gt;2 01/02/2006&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 09:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407584#M99337</guid>
      <dc:creator>lillymaginta</dc:creator>
      <dc:date>2017-10-26T09:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: delete observation occurred after a specific date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407585#M99338</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;&lt;BR /&gt;if date gt '01Oct2006'd then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 09:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407585#M99338</guid>
      <dc:creator>ShiroAmada</dc:creator>
      <dc:date>2017-10-26T09:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete observation occurred after a specific date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407588#M99339</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are&amp;nbsp;a few different options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using Delete&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;data output;
set input;

if date&amp;gt;'10Jan2006'd then delete;

run;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using IF&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;data output;
set input;

if date&amp;lt;='10Jan2006'd then output; ** (Then output) is optional;

run;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using Where&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;data output;
set input;
where date&amp;lt;='10Jan2006'd;
run;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Using Where Not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;data output;
set input;
where not (date&amp;lt;='10Jan2006'd);
run;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using SQL Delete&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;proc sql;
delete from dataset
where date&amp;gt;'10Jan2006'd
;
quit;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 09:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407588#M99339</guid>
      <dc:creator>ClarkLawson</dc:creator>
      <dc:date>2017-10-26T09:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete observation occurred after a specific date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407617#M99346</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 12:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/delete-observation-occurred-after-a-specific-date/m-p/407617#M99346</guid>
      <dc:creator>lillymaginta</dc:creator>
      <dc:date>2017-10-26T12:03:08Z</dc:date>
    </item>
  </channel>
</rss>

