<?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 How to convert Month values e.g. Jan, Feb, Mar ...Dec to a numeric variable i.e. 1,2,3...12 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210018#M52010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm new to SAS and am using SAS Enterprise Miner 14.1.&lt;/P&gt;&lt;P&gt;My problem is pretty simple (but so am I&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;).&lt;/P&gt;&lt;P&gt;I have a variable "month" that can take the values Jan, Feb, Mar ... Dec but I want to create a new numeric variable from that, let's call it nmonth, that is = 1 if month=Jan, =2 if month = Feb etc.&lt;/P&gt;&lt;P&gt;The Help suggests Expression Builder seems to be the way to go but how do I get to this (if indeed this is the best way to go)?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Confused&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Aug 2015 05:02:51 GMT</pubDate>
    <dc:creator>WABogan</dc:creator>
    <dc:date>2015-08-29T05:02:51Z</dc:date>
    <item>
      <title>How to convert Month values e.g. Jan, Feb, Mar ...Dec to a numeric variable i.e. 1,2,3...12</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210018#M52010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm new to SAS and am using SAS Enterprise Miner 14.1.&lt;/P&gt;&lt;P&gt;My problem is pretty simple (but so am I&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;).&lt;/P&gt;&lt;P&gt;I have a variable "month" that can take the values Jan, Feb, Mar ... Dec but I want to create a new numeric variable from that, let's call it nmonth, that is = 1 if month=Jan, =2 if month = Feb etc.&lt;/P&gt;&lt;P&gt;The Help suggests Expression Builder seems to be the way to go but how do I get to this (if indeed this is the best way to go)?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Confused&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 05:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210018#M52010</guid>
      <dc:creator>WABogan</dc:creator>
      <dc:date>2015-08-29T05:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Month values e.g. Jan, Feb, Mar ...Dec to a numeric variable i.e. 1,2,3...12</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210019#M52011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, here's a data step attempt (still an Enterprise Guide holdout).&amp;nbsp; The variable NEW is NUMERIC ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input old :$3. @@;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;JAN MAR OCT DEC&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;set x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;new = input(put(input(catt(old,'1960'),monyy.),month.),2.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;DATA SET x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; old&amp;nbsp;&amp;nbsp;&amp;nbsp; new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OCT&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEC&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 17:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210019#M52011</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-08-29T17:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Month values e.g. Jan, Feb, Mar ...Dec to a numeric variable i.e. 1,2,3...12</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210020#M52012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks MikeZdeb&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 23:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-Month-values-e-g-Jan-Feb-Mar-Dec-to-a-numeric/m-p/210020#M52012</guid>
      <dc:creator>WABogan</dc:creator>
      <dc:date>2015-08-30T23:08:36Z</dc:date>
    </item>
  </channel>
</rss>

