<?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: Informat for MMM-DD-YY in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578063#M163896</link>
    <description>Thanks very much for the quick response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 31 Jul 2019 13:19:43 GMT</pubDate>
    <dc:creator>JW_Hyde</dc:creator>
    <dc:date>2019-07-31T13:19:43Z</dc:date>
    <item>
      <title>Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578024#M163881</link>
      <description>&lt;P&gt;This informat I cannot find. When I use the ANYDTDTE7. informat it comes up with the incorrect SAS date.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 12:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578024#M163881</guid>
      <dc:creator>JW_Hyde</dc:creator>
      <dc:date>2019-07-31T12:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578029#M163882</link>
      <description>&lt;P&gt;Does MMM mean you have a three-letter month name?&lt;/P&gt;
&lt;P&gt;In this case, you will have to reshuffle the string before converting:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input str_date :$9.;
datalines;
jan-01-19
mar-28-18
;

data want;
set have;
num_date = input(substr(str_date,5,2)!!substr(str_date,1,3)!!substr(str_date,8,2),date7.);
format num_date e8601da10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 12:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578029#M163882</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-31T12:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578038#M163885</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
given_date='Jan-20-19';
length _t1 $9;
do _i=2,1,3;
_t1=cats(_t1,scan(given_date,_i,'-'));
end;
want_date=input(_t1,date9.);
drop _:;
format want_date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 12:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578038#M163885</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-07-31T12:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578041#M163887</link>
      <description>Have you tried ANYDTDTE9. ?&lt;BR /&gt;&lt;BR /&gt;When the date contains 9 characters but your informat only reads 7 characters, expect the results to be unusual.</description>
      <pubDate>Wed, 31 Jul 2019 12:50:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578041#M163887</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-07-31T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578063#M163896</link>
      <description>Thanks very much for the quick response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2019 13:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578063#M163896</guid>
      <dc:creator>JW_Hyde</dc:creator>
      <dc:date>2019-07-31T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578064#M163897</link>
      <description>Thanks very much for your quick response. This solution works the best for what I need.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2019 13:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578064#M163897</guid>
      <dc:creator>JW_Hyde</dc:creator>
      <dc:date>2019-07-31T13:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Informat for MMM-DD-YY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578136#M163924</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Have you tried ANYDTDTE9. ?&lt;BR /&gt;&lt;BR /&gt;When the date contains 9 characters but your informat only reads 7 characters, expect the results to be unusual.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I tried it and fails. But interestingly enough&lt;/P&gt;
&lt;PRE&gt;data want;
given_date='Jan-20-2019';
date = input(given_date,anydtdte11.);
format date date9.;
run;
&lt;/PRE&gt;
&lt;P&gt;seems to work just fine. Yet another reason NOT to use 2 digit years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW&lt;/P&gt;
&lt;PRE&gt;data want;
given_date='Jan-20-2019';
date = input(given_date,anydtdte.);
format date date9.;
run;
&lt;/PRE&gt;
&lt;P&gt;Fails as well.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 16:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Informat-for-MMM-DD-YY/m-p/578136#M163924</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-31T16:39:10Z</dc:date>
    </item>
  </channel>
</rss>

