<?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: Convert Character to Date (MONNAME3.) format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290785#M59789</link>
    <description>&lt;P&gt;You will have to be prepared to supply more information.&amp;nbsp; SAS dates represent a particular day.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given a three-letter month, you can always decide that the day should match the first day of the month.&amp;nbsp; But you have to be prepared to supply a year as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Editor's note: added sample code to illustrate this solution.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mon;
 infile datalines;
 length monname $ 3 month 8;
 format month monname3.;
 input monname;
 /* building a proper date with DayMonthYear             */
 /* "Jan" becomes "01Jan0", which SAS can read as a date */
 month = input( cat('01',monname,'0'), date9.);
datalines;
Jan
Feb
Mar
Apr
Jan
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 10 Aug 2016 19:02:54 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-08-10T19:02:54Z</dc:date>
    <item>
      <title>Convert Character to Date (MONNAME3.) format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290782#M59788</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imported a data from excel file into SAS dataset, and I had month name (e.g. Jan, Feb) in one of the fields.&amp;nbsp; When I imported it, the fields was imported as Character, but I'd like to change it to date (MONNAME3.) format.&amp;nbsp; I tried it to change&amp;nbsp;in "Property" tab, and under "General" -&amp;gt; "Group" to Date, but I saw only Character in Group.&amp;nbsp; Can someone help me how I can change it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 18:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290782#M59788</guid>
      <dc:creator>SKP</dc:creator>
      <dc:date>2016-08-10T18:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Character to Date (MONNAME3.) format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290785#M59789</link>
      <description>&lt;P&gt;You will have to be prepared to supply more information.&amp;nbsp; SAS dates represent a particular day.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given a three-letter month, you can always decide that the day should match the first day of the month.&amp;nbsp; But you have to be prepared to supply a year as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Editor's note: added sample code to illustrate this solution.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mon;
 infile datalines;
 length monname $ 3 month 8;
 format month monname3.;
 input monname;
 /* building a proper date with DayMonthYear             */
 /* "Jan" becomes "01Jan0", which SAS can read as a date */
 month = input( cat('01',monname,'0'), date9.);
datalines;
Jan
Feb
Mar
Apr
Jan
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Aug 2016 19:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290785#M59789</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-10T19:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Character to Date (MONNAME3.) format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290788#M59790</link>
      <description>&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;I added date 1 and year 0, and it worked.&amp;nbsp; I was able to change it to MONNAME3. format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 18:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-Character-to-Date-MONNAME3-format/m-p/290788#M59790</guid>
      <dc:creator>SKP</dc:creator>
      <dc:date>2016-08-10T18:36:07Z</dc:date>
    </item>
  </channel>
</rss>

