<?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 Nonoverlapping 3 months window in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577852#M163780</link>
    <description>&lt;P&gt;Hi admin and others,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the data:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;EventDate&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Value&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;17/07/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;08/8/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 20/11/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 04/06/2003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 11/05/2005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 08/09/2005&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 02/11/2005 --&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 17/2/2006&amp;nbsp; --&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 28/09/2006--&lt;/P&gt;&lt;P&gt;I want to delete for the same id during the three months before or after Eventdate. So if the 17/07/1999 then next date is 20/11/1999, delete 08/10/1999 because intck ("month", 17/07/1999,&amp;nbsp;08/08/1999)&amp;lt; 3 months. But if 08/08/1999 deleted, then I will check 17/07/1999 and 20/11/199, the distance is more than 3 months then I keep it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The I tried to combine all data by itself by id, then if intck &amp;gt;3 then delete then I have two (17/7/1999 and 20/11/1999) (&amp;nbsp;08/08/1999 and 20/11/1999) and I have no idea to delete 08/08. If first.date ... cannot work for this case and I cannot keep the last date if use intck.&lt;/P&gt;&lt;P&gt;Please help and advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;Ha&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 18:17:50 GMT</pubDate>
    <dc:creator>yotsuba88</dc:creator>
    <dc:date>2019-07-30T18:17:50Z</dc:date>
    <item>
      <title>Nonoverlapping 3 months window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577852#M163780</link>
      <description>&lt;P&gt;Hi admin and others,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the data:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;EventDate&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Value&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;17/07/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;08/8/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 20/11/1999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 04/06/2003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 11/05/2005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 08/09/2005&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 02/11/2005 --&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 17/2/2006&amp;nbsp; --&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 28/09/2006--&lt;/P&gt;&lt;P&gt;I want to delete for the same id during the three months before or after Eventdate. So if the 17/07/1999 then next date is 20/11/1999, delete 08/10/1999 because intck ("month", 17/07/1999,&amp;nbsp;08/08/1999)&amp;lt; 3 months. But if 08/08/1999 deleted, then I will check 17/07/1999 and 20/11/199, the distance is more than 3 months then I keep it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The I tried to combine all data by itself by id, then if intck &amp;gt;3 then delete then I have two (17/7/1999 and 20/11/1999) (&amp;nbsp;08/08/1999 and 20/11/1999) and I have no idea to delete 08/08. If first.date ... cannot work for this case and I cannot keep the last date if use intck.&lt;/P&gt;&lt;P&gt;Please help and advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;Ha&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 18:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577852#M163780</guid>
      <dc:creator>yotsuba88</dc:creator>
      <dc:date>2019-07-30T18:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Nonoverlapping 3 months window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577854#M163781</link>
      <description>&lt;P&gt;Are the comparisons always to the first date (&lt;SPAN&gt;17/07/1999) or to the previous non-deleted date?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 18:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577854#M163781</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-30T18:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Nonoverlapping 3 months window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577856#M163783</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106891"&gt;@yotsuba88&lt;/a&gt;&amp;nbsp; &amp;nbsp;Please post a sample of your expected OUTPUT(WANT) for the input sample(HAVE) with your explanation. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 18:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577856#M163783</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-07-30T18:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Nonoverlapping 3 months window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577865#M163790</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 

data have;
Input ID   EventDate   :ddmmyy10.          Value    $;
format EventDate   ddmmyy10. ;
cards;
1     17/07/1999       a 
1     08/8/1999       b
1    20/11/1999       c
1    04/06/2003        d
1    11/05/2005        e
;


data want;
set have;
by id;
retain _d;
if first.id then do;output; _d=eventdate;end;
else if intck('mon',_d,eventdate)&amp;gt;3 then do;output;_d=eventdate;end;
drop _d;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jul 2019 18:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/577865#M163790</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-07-30T18:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nonoverlapping 3 months window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/578083#M163907</link>
      <description>Hi Paige,&lt;BR /&gt;&lt;BR /&gt;Thank you for your question. I want to compare with the previous non-deleted date.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2019 13:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Nonoverlapping-3-months-window/m-p/578083#M163907</guid>
      <dc:creator>yotsuba88</dc:creator>
      <dc:date>2019-07-31T13:49:00Z</dc:date>
    </item>
  </channel>
</rss>

