<?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/253324#M268826</link>
    <description>Thank you:)</description>
    <pubDate>Tue, 01 Mar 2016 01:16:10 GMT</pubDate>
    <dc:creator>myboys2</dc:creator>
    <dc:date>2016-03-01T01:16:10Z</dc:date>
    <item>
      <title>date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253319#M268824</link>
      <description>&lt;P&gt;I have dates comming in as char 02-mar-49, how do i read this date in and output it to yymmddn8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 00:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253319#M268824</guid>
      <dc:creator>myboys2</dc:creator>
      <dc:date>2016-03-01T00:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253320#M268825</link>
      <description>&lt;P&gt;Use DATE9. as the INFORMAT and YYMMDDN8. as the format.&lt;/P&gt;
&lt;P&gt;So if you are reading from a text file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
   infile 'myfile' ;
   input mydate date9.;
   format mydate yymmddn8.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you already have the value in a character variable then you can use INPUT function to convert it to an actual date.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mydate=input(mystr,date9.);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to write it back to another character variable then use the PUT function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mystr2 = put(mydate,yymmddn8.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Mar 2016 01:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253320#M268825</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-03-01T01:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253324#M268826</link>
      <description>Thank you:)</description>
      <pubDate>Tue, 01 Mar 2016 01:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-conversion/m-p/253324#M268826</guid>
      <dc:creator>myboys2</dc:creator>
      <dc:date>2016-03-01T01:16:10Z</dc:date>
    </item>
  </channel>
</rss>

