<?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: How to extract YEAR data from yymmddn8 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497137#M131660</link>
    <description>&lt;P&gt;Or don't create an additional variable and just use the YEAR4. Format for your date variable in any procedure.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Sep 2018 20:45:25 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-19T20:45:25Z</dc:date>
    <item>
      <title>How to extract YEAR data from yymmddn8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497046#M131613</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want exact only YEAR data from a date format like yymmddn8. How can I do it? I tried the following codes, but it didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate your helps very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data year01;set year 
year=substr(date,1,4);
yr=mdy(year);
format yr yyn4.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 16:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497046#M131613</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-09-19T16:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract YEAR data from yymmddn8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497049#M131615</link>
      <description>&lt;P&gt;year function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;year=year(date);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This assumes your date is a numeric sas date variable&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 16:32:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497049#M131615</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-19T16:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract YEAR data from yymmddn8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497056#M131621</link>
      <description>Thank you so much!</description>
      <pubDate>Wed, 19 Sep 2018 16:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497056#M131621</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-09-19T16:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract YEAR data from yymmddn8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497137#M131660</link>
      <description>&lt;P&gt;Or don't create an additional variable and just use the YEAR4. Format for your date variable in any procedure.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 20:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-YEAR-data-from-yymmddn8/m-p/497137#M131660</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-19T20:45:25Z</dc:date>
    </item>
  </channel>
</rss>

