<?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 Converting Date number to Date9. in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/224777#M3174</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a &lt;SPAN class="lia-search-match-lithium"&gt;date1&lt;/SPAN&gt; variable with&amp;nbsp;&lt;SPAN class="lia-search-match-lithium"&gt;number&lt;/SPAN&gt;&amp;nbsp;(20140220) and I need to convert it to Date9. &lt;SPAN class="lia-search-match-lithium"&gt;format (&lt;/SPAN&gt;20FEB2014)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any comments highly appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2015 16:19:09 GMT</pubDate>
    <dc:creator>mlogan</dc:creator>
    <dc:date>2015-09-09T16:19:09Z</dc:date>
    <item>
      <title>Converting Date number to Date9.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/224777#M3174</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a &lt;SPAN class="lia-search-match-lithium"&gt;date1&lt;/SPAN&gt; variable with&amp;nbsp;&lt;SPAN class="lia-search-match-lithium"&gt;number&lt;/SPAN&gt;&amp;nbsp;(20140220) and I need to convert it to Date9. &lt;SPAN class="lia-search-match-lithium"&gt;format (&lt;/SPAN&gt;20FEB2014)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any comments highly appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2015 16:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/224777#M3174</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-09-09T16:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Date number to Date9.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/224788#M3175</link>
      <description>&lt;P&gt;One way is to convert the number to a character string and then use the INPUT function to apply a date format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
format d DATE9.;         /* display d as date */
date1 = 20140220;
c = put(date1, 8.);      /* convert to char */
d = input(c, anydtdte.); /* read with "anydate" format */
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Sep 2015 17:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/224788#M3175</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-09-09T17:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Date number to Date9.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/225269#M3186</link>
      <description>&lt;P&gt;Since it is already a number you could convert the value to a SAS date value and apply the DATE9. format to the variable.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
    set have ;
    date1 = input(put(date1,8.),yymmdd8.);
    format date1 date9. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Sep 2015 13:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Converting-Date-number-to-Date9/m-p/225269#M3186</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-09-12T13:28:47Z</dc:date>
    </item>
  </channel>
</rss>

