<?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 Convert numeric in format YY to date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251682#M56743</link>
    <description>&lt;P&gt;&amp;nbsp;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert a numeric in the format YY (e.g. '70' represents '1970') to a date format. I don't think I can use informats since I'm reading this in from a xls file. &amp;nbsp;Is there a straightforward way to do this? Whenever I try to use date formats, SAS assumes the values are already in SAS dat format and outputs 1960 for them all, because the values are all so small. I know this is a very basic question, but I'm brand new to SAS and after searching the internet I couldn't seem to find a suitable answer. Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2016 00:02:43 GMT</pubDate>
    <dc:creator>jackwesley</dc:creator>
    <dc:date>2016-02-23T00:02:43Z</dc:date>
    <item>
      <title>Convert numeric in format YY to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251682#M56743</link>
      <description>&lt;P&gt;&amp;nbsp;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert a numeric in the format YY (e.g. '70' represents '1970') to a date format. I don't think I can use informats since I'm reading this in from a xls file. &amp;nbsp;Is there a straightforward way to do this? Whenever I try to use date formats, SAS assumes the values are already in SAS dat format and outputs 1960 for them all, because the values are all so small. I know this is a very basic question, but I'm brand new to SAS and after searching the internet I couldn't seem to find a suitable answer. Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 00:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251682#M56743</guid>
      <dc:creator>jackwesley</dc:creator>
      <dc:date>2016-02-23T00:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric in format YY to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251684#M56745</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input yy;
sasdate=mdy(1,1,yy);
format sasdate year.;
datalines;
70
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Feb 2016 00:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251684#M56745</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2016-02-23T00:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric in format YY to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251688#M56748</link>
      <description>&lt;P&gt;I can't really think of a good reason to convert 60 to a date. &amp;nbsp;Why not just convert it to a year? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Y = Y + 1900;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Easy to code, simple to interpret later. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As was noted in the other response, if you do want to convert it to a date, you will have to pick which day of the year to use. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 01:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251688#M56748</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-23T01:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric in format YY to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251740#M56755</link>
      <description>&lt;P&gt;I completely agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;, why bother converting when your just adding a number on. &amp;nbsp;However I would also add why are you using partial dates? &amp;nbsp;Should 10 be 1910 or 2010? &amp;nbsp;I would start by going back to the source and fixing the data there, you should never be guessing on what the data represents.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 09:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251740#M56755</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-23T09:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric in format YY to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251787#M56760</link>
      <description>&lt;P&gt;Also search at support.sas.com. &amp;nbsp;You will find the answer to most questions in the online documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not agree that converting the year to a SAS date is a bad idea. &amp;nbsp;There are many reasons to use SAS dates that should be obvious to most.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49185"&gt;@mohamed_zaki﻿&lt;/a&gt;&amp;nbsp;has answered your question and provide the formated needed to display '01JAN1970'd as a year.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 15:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-numeric-in-format-YY-to-date/m-p/251787#M56760</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-02-23T15:37:53Z</dc:date>
    </item>
  </channel>
</rss>

