<?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 Month from date variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438235#M109230</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have written below mentioned code for getting Month of Bonus from Hire date but in Month it shows only Jan, as hire date is starting on 1st of any month so its reading the date and showing as jan.the result output is attached for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FORMAT HIRE_DATE date9. BIRTH_DATE DDMMYY10.;*TO FORMAT DATE;&lt;BR /&gt;BonusMonth= month(Hire_Date);&lt;BR /&gt;format bonusmonth monname3.;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Feb 2018 04:19:52 GMT</pubDate>
    <dc:creator>rasika</dc:creator>
    <dc:date>2018-02-18T04:19:52Z</dc:date>
    <item>
      <title>Month from date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438235#M109230</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have written below mentioned code for getting Month of Bonus from Hire date but in Month it shows only Jan, as hire date is starting on 1st of any month so its reading the date and showing as jan.the result output is attached for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FORMAT HIRE_DATE date9. BIRTH_DATE DDMMYY10.;*TO FORMAT DATE;&lt;BR /&gt;BonusMonth= month(Hire_Date);&lt;BR /&gt;format bonusmonth monname3.;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 04:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438235#M109230</guid>
      <dc:creator>rasika</dc:creator>
      <dc:date>2018-02-18T04:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Month from date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438236#M109231</link>
      <description>&lt;P&gt;How do want it displayed? Like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;BonusMonth = Hire_Date;
format BonusMonth monyy7.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Feb 2018 04:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438236#M109231</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-02-18T04:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Month from date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438237#M109232</link>
      <description>&lt;P&gt;Your are applying format monname to a number that is a date value rather than a month value. So, upto 31 will ofcourse show as jan for the year 1960.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;  
 value mn_name 1='January'
               2='February'
               3='March'
               4='April'
               5='May'
               6='June'
               7='July'
               8='August'
               9='September'
              10='October'
              11='November'
              12='December'
           other='Invalid';
run;

and apply:
format bonusmonth mn_name.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Feb 2018 04:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438237#M109232</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-02-18T04:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Month from date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438238#M109233</link>
      <description>&lt;P&gt;Theres a MONNAME format you can use directly on the date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Month = put(date, monname.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Feb 2018 04:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438238#M109233</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-18T04:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Month from date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438977#M109494</link>
      <description>Thank You Soo muchh</description>
      <pubDate>Wed, 21 Feb 2018 16:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Month-from-date-variable/m-p/438977#M109494</guid>
      <dc:creator>rasika</dc:creator>
      <dc:date>2018-02-21T16:08:25Z</dc:date>
    </item>
  </channel>
</rss>

