<?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: yearCutoff in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314161#M68383</link>
    <description>&lt;P&gt;None of the above, though I suppose it depends on the question which you have not provided. It helps...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Easiest way to answer this question is to run the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options yearcutoff=1920;
data test;
datea='01jan19'd;
dateb='01jan20'd;
year=dateb-datea;
format datea dateb date9.;
run;

proc print data=test;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                             Obs        datea        dateb     year

                             1     01JAN2019    01JAN1920    -36160
&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 23:24:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-11-24T23:24:49Z</dc:date>
    <item>
      <title>yearCutoff</title>
      <link>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314158#M68382</link>
      <description>&lt;P&gt;options yearcutoff=1920;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;datea='01jan19'd;&lt;/P&gt;&lt;P&gt;dateb='01jan20'd;&lt;/P&gt;&lt;P&gt;year=dateb-datea;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;a. 0&lt;/P&gt;&lt;P&gt;b. -1&lt;/P&gt;&lt;P&gt;c.1&lt;/P&gt;&lt;P&gt;d.99&lt;/P&gt;&lt;P&gt;Which one is the correct answer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 22:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314158#M68382</guid>
      <dc:creator>ysyeda</dc:creator>
      <dc:date>2016-11-24T22:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: yearCutoff</title>
      <link>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314161#M68383</link>
      <description>&lt;P&gt;None of the above, though I suppose it depends on the question which you have not provided. It helps...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Easiest way to answer this question is to run the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options yearcutoff=1920;
data test;
datea='01jan19'd;
dateb='01jan20'd;
year=dateb-datea;
format datea dateb date9.;
run;

proc print data=test;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                             Obs        datea        dateb     year

                             1     01JAN2019    01JAN1920    -36160
&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 23:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314161#M68383</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-24T23:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: yearCutoff</title>
      <link>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314163#M68384</link>
      <description>&lt;P&gt;Hint : datea and dateb are SAS dates, not years. SAS internal representation of dates is the number of days since 01JAN1960.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 23:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/yearCutoff/m-p/314163#M68384</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-24T23:33:05Z</dc:date>
    </item>
  </channel>
</rss>

