<?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 Choosing Months, but Exclude Non-Full Months in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588296#M168110</link>
    <description>&lt;P&gt;I have the following filter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHERE t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if &amp;amp;months_back is 3, I will get data from all of June, July, and August of this year.....but it will also include September. I do not want September...I only want the last number of FULL months as identified with the macro variable&amp;nbsp;&amp;amp;months_back. What filter can I add to get rid of the partial month dates?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 15:34:24 GMT</pubDate>
    <dc:creator>BCNAV</dc:creator>
    <dc:date>2019-09-12T15:34:24Z</dc:date>
    <item>
      <title>Choosing Months, but Exclude Non-Full Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588296#M168110</link>
      <description>&lt;P&gt;I have the following filter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHERE t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if &amp;amp;months_back is 3, I will get data from all of June, July, and August of this year.....but it will also include September. I do not want September...I only want the last number of FULL months as identified with the macro variable&amp;nbsp;&amp;amp;months_back. What filter can I add to get rid of the partial month dates?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588296#M168110</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2019-09-12T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Choosing Months, but Exclude Non-Full Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588297#M168111</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back) and t1.flightdate &amp;lt; intnx('month', today(), 0, 'b');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Same idea, use INTNX() to get current months first day (interval = 0, aligment = b) and use BETWEEN or &amp;lt; for the date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142314"&gt;@BCNAV&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have the following filter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so if &amp;amp;months_back is 3, I will get data from all of June, July, and August of this year.....but it will also include September. I do not want September...I only want the last number of FULL months as identified with the macro variable&amp;nbsp;&amp;amp;months_back. What filter can I add to get rid of the partial month dates?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588297#M168111</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-12T15:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Choosing Months, but Exclude Non-Full Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588298#M168112</link>
      <description>&lt;P&gt;SAS supports structures like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where value1 &amp;lt; value2 &amp;lt; value3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So add the other constraint&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE&amp;nbsp; somevalue &amp;gt; t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;perhaps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where intx('month',today(),0,'B') &amp;gt; t1.flightdate &amp;gt;= intnx('Month',today(),-&amp;amp;months_back)&lt;/P&gt;
&lt;P&gt;if you only want dates prior to the beginning of the current month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588298#M168112</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-12T15:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Choosing Months, but Exclude Non-Full Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588303#M168114</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
where intnx('Month',today(),-3)&amp;lt;=date&amp;lt;=intnx('Month',today(),-1,'e');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2019 16:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choosing-Months-but-Exclude-Non-Full-Months/m-p/588303#M168114</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-09-12T16:10:48Z</dc:date>
    </item>
  </channel>
</rss>

