<?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 Syntax to Compare a Date from a Date Prompt to another Date Field in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649335#M194647</link>
    <description>&lt;P&gt;I have a request to set up a program using date prompts in SAS EG.&amp;nbsp; I am looking to see why I am getting the following error when I try and compare a date in the file to the date in the prompt.&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;31 create table WORK.REPORT_1_TEMP as&lt;BR /&gt;32 select datepart (t1.createdate) as createdate format=date9.,&lt;BR /&gt;33 t1.createdate as createdate1,&lt;BR /&gt;34 t1.companyid,&lt;BR /&gt;35 t3.name,&lt;BR /&gt;36 t3.attention,&lt;BR /&gt;37 t3.emailaddress,&lt;BR /&gt;38 (Case&lt;BR /&gt;39 WHEN t1.filingtypeenum = 1 THEN '2290 Filing'&lt;BR /&gt;40 WHEN t1.filingtypeenum = 2 THEN 'Amended 2290'&lt;BR /&gt;41 WHEN t1.filingtypeenum = 3 THEN '8849'&lt;BR /&gt;42 WHEN t1.filingtypeenum = 4 THEN 'VIN Correction'&lt;BR /&gt;43 ELSE '' END) AS FilingType,&lt;BR /&gt;44 t1.taxwizardstepenum&lt;BR /&gt;45 from onl2290.taxfiling t1, onl2290.companygroupcompanylevel t2, onl2290.companygroup t3&lt;BR /&gt;46 where (t1.companyid = t2.companyid and t2.companygroupid = t3.id) and (t1.taxwizardstepenum in (7,22)&lt;BR /&gt;47 and t1.createdate &amp;gt;= "&amp;amp;Start_Date"d, and t1.createdate &amp;lt;= "&amp;amp;End_Date"d ) and t1.returnstatusenum = 1 and t3.name not&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;47 ! contains '_top' and&lt;BR /&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, EQT, GE,&lt;BR /&gt;GET, GT, GTT, LE, LET, LT, LTT, NE, NET, NOT, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2020 18:50:29 GMT</pubDate>
    <dc:creator>cbrotz</dc:creator>
    <dc:date>2020-05-20T18:50:29Z</dc:date>
    <item>
      <title>Syntax to Compare a Date from a Date Prompt to another Date Field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649335#M194647</link>
      <description>&lt;P&gt;I have a request to set up a program using date prompts in SAS EG.&amp;nbsp; I am looking to see why I am getting the following error when I try and compare a date in the file to the date in the prompt.&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;31 create table WORK.REPORT_1_TEMP as&lt;BR /&gt;32 select datepart (t1.createdate) as createdate format=date9.,&lt;BR /&gt;33 t1.createdate as createdate1,&lt;BR /&gt;34 t1.companyid,&lt;BR /&gt;35 t3.name,&lt;BR /&gt;36 t3.attention,&lt;BR /&gt;37 t3.emailaddress,&lt;BR /&gt;38 (Case&lt;BR /&gt;39 WHEN t1.filingtypeenum = 1 THEN '2290 Filing'&lt;BR /&gt;40 WHEN t1.filingtypeenum = 2 THEN 'Amended 2290'&lt;BR /&gt;41 WHEN t1.filingtypeenum = 3 THEN '8849'&lt;BR /&gt;42 WHEN t1.filingtypeenum = 4 THEN 'VIN Correction'&lt;BR /&gt;43 ELSE '' END) AS FilingType,&lt;BR /&gt;44 t1.taxwizardstepenum&lt;BR /&gt;45 from onl2290.taxfiling t1, onl2290.companygroupcompanylevel t2, onl2290.companygroup t3&lt;BR /&gt;46 where (t1.companyid = t2.companyid and t2.companygroupid = t3.id) and (t1.taxwizardstepenum in (7,22)&lt;BR /&gt;47 and t1.createdate &amp;gt;= "&amp;amp;Start_Date"d, and t1.createdate &amp;lt;= "&amp;amp;End_Date"d ) and t1.returnstatusenum = 1 and t3.name not&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;47 ! contains '_top' and&lt;BR /&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, EQT, GE,&lt;BR /&gt;GET, GT, GTT, LE, LET, LT, LTT, NE, NET, NOT, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 18:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649335#M194647</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2020-05-20T18:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Compare a Date from a Date Prompt to another Date Field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649337#M194648</link>
      <description>&lt;P&gt;Here is a screen shot of the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cbrotz_0-1590000740770.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39673iC88E6751FE4D7879/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cbrotz_0-1590000740770.png" alt="cbrotz_0-1590000740770.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 18:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649337#M194648</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2020-05-20T18:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Compare a Date from a Date Prompt to another Date Field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649343#M194650</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/112131"&gt;@cbrotz&lt;/a&gt;&amp;nbsp; Did you notice the erroneous comma&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;t1.createdate &amp;gt;= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&amp;amp;Start_Date"d, and t&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 18:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649343#M194650</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-05-20T18:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Compare a Date from a Date Prompt to another Date Field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649347#M194652</link>
      <description>&lt;P&gt;No I did not.&amp;nbsp; An hour later....Thank you very much.&amp;nbsp; It ran fine now. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 19:01:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-Compare-a-Date-from-a-Date-Prompt-to-another-Date/m-p/649347#M194652</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2020-05-20T19:01:10Z</dc:date>
    </item>
  </channel>
</rss>

