<?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: Restricting data by Date proc sql; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313879#M68277</link>
    <description>&lt;P&gt;try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where date LE '01jan2016'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the SAS date stored as numbers, counting days from 1/1/1960. So you either use the number of days directly, in this case, 20454 days from 1/1/1960, or tell SAS how to read it correctly, such as in the above example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2016 19:59:49 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2016-11-23T19:59:49Z</dc:date>
    <item>
      <title>Restricting data by Date proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313868#M68273</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to reduce the data returned from a very large table by the date (Proc sql in SAS 9.4)&lt;/P&gt;&lt;P&gt;The format of the column is DDYYMM8. (Number)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my where clause I have tried:&lt;/P&gt;&lt;P&gt;where date &amp;gt;= 01-01-16&lt;/P&gt;&lt;P&gt;where date &amp;gt;= 01/01/16&lt;/P&gt;&lt;P&gt;and the reverse eg 16/01/01 etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All attempts so far have resulted in dates still being returned which are older than 01/01/16&lt;/P&gt;&lt;P&gt;Can anyone help please?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 19:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313868#M68273</guid>
      <dc:creator>Caroline_22</dc:creator>
      <dc:date>2016-11-23T19:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting data by Date proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313879#M68277</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where date LE '01jan2016'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the SAS date stored as numbers, counting days from 1/1/1960. So you either use the number of days directly, in this case, 20454 days from 1/1/1960, or tell SAS how to read it correctly, such as in the above example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 19:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313879#M68277</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2016-11-23T19:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting data by Date proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313880#M68278</link>
      <description>&lt;P&gt;Thank you for this it's worked perfectly!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 20:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Restricting-data-by-Date-proc-sql/m-p/313880#M68278</guid>
      <dc:creator>Caroline_22</dc:creator>
      <dc:date>2016-11-23T20:06:06Z</dc:date>
    </item>
  </channel>
</rss>

