<?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: Num8 to YYMMDDN8 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/445776#M111754</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same problem here!&lt;/P&gt;&lt;P&gt;I used this:&lt;/P&gt;&lt;PRE&gt;input(put(t1.DAT,8.),YYYYMMDD8.)&lt;/PRE&gt;&lt;P&gt;And the solution doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified the format to YYMMDDN8., so the format is well going from numeric8. to date8. but I also have&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;*******************&lt;/PRE&gt;&lt;P&gt;for every date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of values of DAT at the top rows of the table are null. Can it explain?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 10:49:11 GMT</pubDate>
    <dc:creator>fabdu92</dc:creator>
    <dc:date>2018-03-15T10:49:11Z</dc:date>
    <item>
      <title>Num8 to YYMMDDN8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439745#M109756</link>
      <description>&lt;P&gt;Hi I have a date like 20180101 which is Numeric 8 and I need to transform it to YYMMDDN8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing it just with a proc sql but it's not working well...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;PRE&gt;SELECT
t1.DN_PEO FORMAT=YYMMDDN8.;&lt;/PRE&gt;&lt;P&gt;The date is after written like this:&lt;/P&gt;&lt;PRE&gt;*******************&lt;/PRE&gt;&lt;P&gt;and still in num 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know where is the problem here?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 16:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439745#M109756</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2018-02-23T16:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Num8 to YYMMDDN8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439750#M109758</link>
      <description>&lt;P&gt;Sounds like you are trying to do something like the following:&lt;/P&gt;
&lt;PRE&gt;data have;
  input DN_PEO;
  cards;
20180101
;

proc sql;
  create table want as
    select input(put(DN_PEO,8.),yymmdd8.) as DN_PEO format=YYMMDDN8.
      from have
  ;
quit;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 16:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439750#M109758</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-02-23T16:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Num8 to YYMMDDN8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439837#M109772</link>
      <description>&lt;P&gt;Date values in SAS are stored as number of days from 1st Jan 1960. In your example your saying SAS that 20180101 days form 1st Jan 1960. Which is why you are getting *****. First thing is you need to tell SAS how to read data otherwise it will follow its nature.&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest use&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;solution. Converting the numeric values into character and then telling SAS to convert back into numeric date values.&lt;/P&gt;&lt;P&gt;Also you need to understand about FORMAT(How to show data) and INFORMAT (How to read data).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 20:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/439837#M109772</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-02-23T20:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Num8 to YYMMDDN8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/445776#M111754</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same problem here!&lt;/P&gt;&lt;P&gt;I used this:&lt;/P&gt;&lt;PRE&gt;input(put(t1.DAT,8.),YYYYMMDD8.)&lt;/PRE&gt;&lt;P&gt;And the solution doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified the format to YYMMDDN8., so the format is well going from numeric8. to date8. but I also have&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;*******************&lt;/PRE&gt;&lt;P&gt;for every date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of values of DAT at the top rows of the table are null. Can it explain?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/445776#M111754</guid>
      <dc:creator>fabdu92</dc:creator>
      <dc:date>2018-03-15T10:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Num8 to YYMMDDN8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/445813#M111774</link>
      <description>&lt;P&gt;You'd have to provide an example of your data. My guess is that your dates are already either date or datetime values and you simply need to add the desired format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest that you create a new thread and ask your question there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 12:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Num8-to-YYMMDDN8/m-p/445813#M111774</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-03-15T12:56:41Z</dc:date>
    </item>
  </channel>
</rss>

