<?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: Year of privious month in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589808#M14950</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/291096"&gt;@kazimir900&lt;/a&gt;&amp;nbsp;hi and welcome to the SAS Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   yearofprevmonth=year(intnx('month', today(), -1, 'b'));
   put yearofprevmonth=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Sep 2019 19:41:49 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-09-18T19:41:49Z</dc:date>
    <item>
      <title>Year of privious month</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589805#M14948</link>
      <description>&lt;P&gt;Hey SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to extract just the year of the privious month from the current date in SAS Enterprise Guide. But i can't figure out how to...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lars&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:39:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589805#M14948</guid>
      <dc:creator>kazimir900</dc:creator>
      <dc:date>2019-09-18T19:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Year of privious month</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589807#M14949</link>
      <description>&lt;P&gt;In a data step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;prev_year=year(intnx('month',today(),-1));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589807#M14949</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-18T19:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Year of privious month</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589808#M14950</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/291096"&gt;@kazimir900&lt;/a&gt;&amp;nbsp;hi and welcome to the SAS Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   yearofprevmonth=year(intnx('month', today(), -1, 'b'));
   put yearofprevmonth=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589808#M14950</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-18T19:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Year of privious month</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589810#M14951</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let current_date=%sysfunc(today());

%let prev_month=%sysfunc(intnx(mon,&amp;amp;current_date,-1),monyy7.);

%put &amp;amp;=prev_month;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589810#M14951</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-09-18T19:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Year of privious month</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589814#M14952</link>
      <description>&lt;P&gt;Thanks for your quick help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried something like that before but some how my code didn't work...but yours does!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Year-of-privious-month/m-p/589814#M14952</guid>
      <dc:creator>kazimir900</dc:creator>
      <dc:date>2019-09-18T19:49:20Z</dc:date>
    </item>
  </channel>
</rss>

