<?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: Get consecutive months using Date Prompt in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826371#M41196</link>
    <description>&lt;P&gt;Thank you very much! It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2022 02:08:49 GMT</pubDate>
    <dc:creator>madara155</dc:creator>
    <dc:date>2022-08-01T02:08:49Z</dc:date>
    <item>
      <title>Get consecutive months using Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826364#M41194</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using a Date prompt to get a month and year (the macro has the values in DDMMMYY format eg: 01JAN2022).&lt;/P&gt;&lt;P&gt;Can someone help me to find a way to obtain the next month and the previous month?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 01:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826364#M41194</guid>
      <dc:creator>madara155</dc:creator>
      <dc:date>2022-08-01T01:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get consecutive months using Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826370#M41195</link>
      <description>&lt;P&gt;Here is one way that is easy to follow:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let MyDate = 01Jan2022;

data _null_;
 Next_Month = intnx('MONTH', "&amp;amp;MyDate"d, 1, 'BEGINNING');
 Last_Month = intnx('MONTH', "&amp;amp;MyDate"d, -1, 'BEGINNING');
 format Next_Month Last_Month date9.;
 call symputx('Next_Month',  put(Next_Month,date9.)); 
 call symputx('Last_Month',  put(Last_Month,date9.)); 
 put _all_;
run;

%put Next_Month = &amp;amp;Next_Month;
%put Last_Month = &amp;amp;Last_Month;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Aug 2022 01:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826370#M41195</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-01T01:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get consecutive months using Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826371#M41196</link>
      <description>&lt;P&gt;Thank you very much! It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 02:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Get-consecutive-months-using-Date-Prompt/m-p/826371#M41196</guid>
      <dc:creator>madara155</dc:creator>
      <dc:date>2022-08-01T02:08:49Z</dc:date>
    </item>
  </channel>
</rss>

