<?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 filter rows with dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537074#M147645</link>
    <description>&lt;P&gt;Yes, &amp;amp;M1. is the same macrovariable as &amp;amp;day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used yours sugestion and work! Tks for support me!&amp;nbsp;&lt;img id="robotvery-happy" class="emoticon emoticon-robotvery-happy" src="https://communities.sas.com/i/smilies/16x16_robot-very-happy.png" alt="Robot Very Happy" title="Robot Very Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 13:09:44 GMT</pubDate>
    <dc:creator>emersonaguiar</dc:creator>
    <dc:date>2019-02-20T13:09:44Z</dc:date>
    <item>
      <title>How filter rows with dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537061#M147642</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to aumotatize a process and for this I need to use the date of the system to filter information.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA dates;
INPUT name $ 1-4 @6 bday date11.;
CARDS;
John 1 Jan 2019
Mary 11 Jul 2019
Kate 12 Nov 2019
Mark 8 Jun 2019&lt;BR /&gt;;
RUN;&lt;BR /&gt;&lt;BR /&gt;PROC PRINT DATA=dates;&lt;BR /&gt;FORMAT bday date9. ;&lt;BR /&gt;RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I catch the date of the system using the function&amp;nbsp;INTNX and I &amp;nbsp;could use the date like a parameter.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let day= %sysfunc(intnx( MONTH , %sysfunc( today() ) , 2), date9.);
%put &amp;amp;day;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But, when I will compare, I can't have a good result&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA dates;
set dates;

where bday &amp;gt; &amp;amp;day;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The mensseges are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;NE, OR, ^=, |, ||, ~=.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 13:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537061#M147642</guid>
      <dc:creator>emersonaguiar</dc:creator>
      <dc:date>2019-02-20T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How filter rows with dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537067#M147643</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is &amp;amp;M1. the same macrovariable as &amp;amp;day. ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;where bday &amp;gt;"&amp;amp;M1."d;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have to use macros ? can't you just write&lt;/P&gt;
&lt;P&gt;where bday &amp;gt; intnx("month", today(),2);&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537067#M147643</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2019-02-20T12:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: How filter rows with dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537068#M147644</link>
      <description>&lt;P&gt;With&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;active, you would see what the macro pre-processor generated. Most-likely not a sas-date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what you have posted i can't tell anything more. Posting complete log is recommended.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537068#M147644</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-02-20T12:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How filter rows with dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537074#M147645</link>
      <description>&lt;P&gt;Yes, &amp;amp;M1. is the same macrovariable as &amp;amp;day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used yours sugestion and work! Tks for support me!&amp;nbsp;&lt;img id="robotvery-happy" class="emoticon emoticon-robotvery-happy" src="https://communities.sas.com/i/smilies/16x16_robot-very-happy.png" alt="Robot Very Happy" title="Robot Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 13:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-filter-rows-with-dates/m-p/537074#M147645</guid>
      <dc:creator>emersonaguiar</dc:creator>
      <dc:date>2019-02-20T13:09:44Z</dc:date>
    </item>
  </channel>
</rss>

