<?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: filter on character date in proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663762#M78941</link>
    <description>&lt;P&gt;Can you try--&lt;/P&gt;
&lt;P&gt;If numeric&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; P.PAY_END_DT &amp;gt;= '01jul2019'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If char&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; input(P.PAY_END_DT,yymmdd10.) &amp;gt;= '01jul2019'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jun 2020 20:44:23 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-06-20T20:44:23Z</dc:date>
    <item>
      <title>filter on character date in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663758#M78940</link>
      <description>&lt;P&gt;I need to add a filter&amp;nbsp;using a date variable which is in character format (e.g., 2017-07-01 00:00:00). Here is my sas code. I keep getting error message in sas log:&amp;nbsp;ERROR: CLI cursor fetch error: [Oracle][ODBC][Ora]ORA-01861: literal does not match format string. I know there is something wrong with the date format in where clause but not sure how to modify it. Anyone can help me with this? Thanks.&lt;/P&gt;&lt;PRE&gt;proc sql;

create table EMPLOYEE as

select A.EMPLID,
       A.USF_ID,
	   A.LAST_NAME,
	   A.FIRST_NAME,
       A.SEX_DESC,
       A.ETHNIC_GROUP_DESC,
	   A.JOB_EFFDT,
	   A.HIRE_DATE,
       A.REHIRE_DATE,
	   A.SERVICE_DATE,
	  A.TERMINATION_DATE,
	   A.POSITION_NBR,
	   A.POSITION_EFFDT,
	   A.POSITION_DESC,
	   A.POSITION_ACTION_DESC,
	   A.POSITION_ACTION_DATE,
	   A.DEPTID,
	   A.DEPTID_DESC,
	   A.VP_AREA_DESC,
	   P.PAY_END_DT as PayPeriodEndDate 
 
FROM Dwhouse.Gems_ps_pay_check_d3 P
LEFT JOIN Dwhouse.Gems_appointment_d3 A on P.EMPLID = A.EMPLID
where A.LOCATION_CODE = '04'
     and P.PAY_END_DT &amp;gt;= '2019-07-01'

order by EMPLID, SERVICE_DATE;

quit;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Jun 2020 20:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663758#M78940</guid>
      <dc:creator>xliu1</dc:creator>
      <dc:date>2020-06-20T20:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: filter on character date in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663762#M78941</link>
      <description>&lt;P&gt;Can you try--&lt;/P&gt;
&lt;P&gt;If numeric&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; P.PAY_END_DT &amp;gt;= '01jul2019'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If char&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; input(P.PAY_END_DT,yymmdd10.) &amp;gt;= '01jul2019'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 20:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663762#M78941</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-20T20:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: filter on character date in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663763#M78942</link>
      <description>&lt;P&gt;Thanks! This works out as I expected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 21:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filter-on-character-date-in-proc-sql/m-p/663763#M78942</guid>
      <dc:creator>xliu1</dc:creator>
      <dc:date>2020-06-20T21:23:26Z</dc:date>
    </item>
  </channel>
</rss>

