<?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 Date Comparison in a Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64343#M13991</link>
    <description>Hi All:&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to compare two dates in a macro and I'm getting the error message:&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Required operator not found in expression: input("&amp;amp;enddate",yymmdd8.) &amp;lt; intnx('year',input("&amp;amp;startdate",yymmdd8.),0,'end')&lt;BR /&gt;
&lt;BR /&gt;
The statement that's causing the error is this:&lt;BR /&gt;
&lt;BR /&gt;
%if input("&amp;amp;enddate",yymmdd8.) &amp;lt; intnx('year',input(&amp;amp;startdate",yymmdd8.),0,'end') %then&lt;BR /&gt;
          %do;&lt;BR /&gt;
                  ...other stuff...&lt;BR /&gt;
&lt;BR /&gt;
Here, enddate = 20090331.  I've done comparisons like this in the past and have never had an error like this.  I'm sure I'm overlooking something very basic.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
T.M. Foy</description>
    <pubDate>Thu, 13 Aug 2009 15:02:38 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-08-13T15:02:38Z</dc:date>
    <item>
      <title>Date Comparison in a Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64343#M13991</link>
      <description>Hi All:&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to compare two dates in a macro and I'm getting the error message:&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Required operator not found in expression: input("&amp;amp;enddate",yymmdd8.) &amp;lt; intnx('year',input("&amp;amp;startdate",yymmdd8.),0,'end')&lt;BR /&gt;
&lt;BR /&gt;
The statement that's causing the error is this:&lt;BR /&gt;
&lt;BR /&gt;
%if input("&amp;amp;enddate",yymmdd8.) &amp;lt; intnx('year',input(&amp;amp;startdate",yymmdd8.),0,'end') %then&lt;BR /&gt;
          %do;&lt;BR /&gt;
                  ...other stuff...&lt;BR /&gt;
&lt;BR /&gt;
Here, enddate = 20090331.  I've done comparisons like this in the past and have never had an error like this.  I'm sure I'm overlooking something very basic.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
T.M. Foy</description>
      <pubDate>Thu, 13 Aug 2009 15:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64343#M13991</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-13T15:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison in a Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64344#M13992</link>
      <description>You will need to explore using the %SYSFUNC macro language function when you want to integrate SAS CALL functions into macro language coding.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 13 Aug 2009 15:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64344#M13992</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-13T15:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison in a Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64345#M13993</link>
      <description>Thanks, I'll try that.</description>
      <pubDate>Thu, 13 Aug 2009 15:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Comparison-in-a-Macro/m-p/64345#M13993</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-13T15:18:28Z</dc:date>
    </item>
  </channel>
</rss>

