<?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: If condition with date macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512383#M137986</link>
    <description>&lt;P&gt;Can you show the community what the date macros are resolving to and data type of your&amp;nbsp;&lt;SPAN&gt;start_dates&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2018 21:59:20 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-11-12T21:59:20Z</dc:date>
    <item>
      <title>If condition with date macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512379#M137983</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have created two date Macros to take out a subset of a huge dataset. Below is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Start rest ;&lt;BR /&gt;set Start3;&lt;BR /&gt;if start_date2 GE &amp;amp;fildt1. and start_date2 LE &amp;amp;fildt2. then output start;&lt;BR /&gt;else output rest;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The date macros are producing proper dates but the If condition is throwing error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error I am getting is&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,&lt;BR /&gt;=, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |,&lt;BR /&gt;||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 21:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512379#M137983</guid>
      <dc:creator>ARTI1</dc:creator>
      <dc:date>2018-11-12T21:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: If condition with date macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512383#M137986</link>
      <description>&lt;P&gt;Can you show the community what the date macros are resolving to and data type of your&amp;nbsp;&lt;SPAN&gt;start_dates&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 21:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512383#M137986</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-12T21:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: If condition with date macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512385#M137988</link>
      <description>&lt;P&gt;SYMBOLGEN: Macro variable FILDT1 resolves to 27SEP2018&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "FILDT1".&lt;BR /&gt;335 27SEP2018&lt;BR /&gt;-------&lt;BR /&gt;22&lt;BR /&gt;SYMBOLGEN: Macro variable FILDT2 resolves to 03OCT2018&lt;BR /&gt;NOTE: Line generated by the macro variable "FILDT2".&lt;BR /&gt;335 03OCT2018&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 22:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512385#M137988</guid>
      <dc:creator>ARTI1</dc:creator>
      <dc:date>2018-11-12T22:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: If condition with date macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512386#M137989</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Can you try the change below&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data Start rest ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set Start3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if start_date2 GE &lt;STRONG&gt;"&amp;amp;fildt1."d&lt;/STRONG&gt; and start_date2 LE &lt;STRONG&gt;"&amp;amp;fildt2."d&lt;/STRONG&gt; then output start;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else output rest;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 22:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512386#M137989</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-12T22:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: If condition with date macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512390#M137993</link>
      <description>Thank you! I had used single quotes and it threw me the same error.</description>
      <pubDate>Mon, 12 Nov 2018 22:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-condition-with-date-macros/m-p/512390#M137993</guid>
      <dc:creator>ARTI1</dc:creator>
      <dc:date>2018-11-12T22:08:21Z</dc:date>
    </item>
  </channel>
</rss>

