<?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 numeric year convert to date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152211#M40030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to convert a numeric year to sas year date. The years are 2013 and 2014. When I have them converted, they are 1965 for both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me the numeric format for year: year=input(substr(compress(reporting_term,1,4),yy4.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I format the year using YEAR4., I am able to get the year formatted, but it gives me 1965.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance will be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2014 16:00:09 GMT</pubDate>
    <dc:creator>TashaBee</dc:creator>
    <dc:date>2014-12-16T16:00:09Z</dc:date>
    <item>
      <title>numeric year convert to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152211#M40030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to convert a numeric year to sas year date. The years are 2013 and 2014. When I have them converted, they are 1965 for both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me the numeric format for year: year=input(substr(compress(reporting_term,1,4),yy4.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I format the year using YEAR4., I am able to get the year formatted, but it gives me 1965.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance will be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152211#M40030</guid>
      <dc:creator>TashaBee</dc:creator>
      <dc:date>2014-12-16T16:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: numeric year convert to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152212#M40031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS doesn't store years as dates.&amp;nbsp; It only stores individual days.&amp;nbsp; If you have a variable that takes on values of 2013, 2014, etc., you can convert them to a legitimate day using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year = mdy(1, 1, year);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the year4 format would print just the year.&amp;nbsp; You're not storing the year, you're storing January 1st of that year.&amp;nbsp; But the format controls what will print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152212#M40031</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-12-16T16:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: numeric year convert to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152213#M40032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erm, just store the 2013 as a number as that is all it is.&amp;nbsp; Not sure why you would want a format on that as 2013 = 2013 nothing fancy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152213#M40032</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-12-16T16:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: numeric year convert to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152214#M40033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!! That worked for what I needed!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 18:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-year-convert-to-date/m-p/152214#M40033</guid>
      <dc:creator>TashaBee</dc:creator>
      <dc:date>2014-12-16T18:02:02Z</dc:date>
    </item>
  </channel>
</rss>

