<?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: date conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605967#M175900</link>
    <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input date;
  cards;
20120317
;
run;

data want (drop=_:);
  set have (rename=(date=_date));
  format date yymmdd8.;
  date=input(put(_date,8.),yymmdd8.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2019 23:21:11 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2019-11-20T23:21:11Z</dc:date>
    <item>
      <title>date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605965#M175899</link>
      <description>&lt;P&gt;Hello There&lt;/P&gt;&lt;P&gt;My date variable is present like 20120317, I tried the code "fomate date yymmdd8.;" hoever, there is a error occurs as " There was a problem with the format so BEST. was used." .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how to convert the 20120317 to yymmdd8.&lt;/P&gt;&lt;P&gt;Thanks advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 23:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605965#M175899</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-11-20T23:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605967#M175900</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input date;
  cards;
20120317
;
run;

data want (drop=_:);
  set have (rename=(date=_date));
  format date yymmdd8.;
  date=input(put(_date,8.),yymmdd8.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 23:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605967#M175900</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2019-11-20T23:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605968#M175901</link>
      <description>&lt;P&gt;Your current variable is apparently a simple numeric with the value 20120317. So conversion would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   datevar = input(put(datevar,f8. -L),yymmdd10.);
   format datevar date9.; /* to show the FORMAT is working*/
run;&lt;/PRE&gt;
&lt;P&gt;use whatever format that you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 23:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/605968#M175901</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-20T23:24:41Z</dc:date>
    </item>
  </channel>
</rss>

