<?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: last month before date of end of month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871066#M344078</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data n;
samedate=intnx('month',today(),0,'s');
prev_month=intnx('month',today(),-1,'s');
thismonth_begin=intnx('month',today(),0,'b');
nextmonth_begin=intnx('month',today(),1,'b');
prev_month_ending=intnx('month',today(),-1,'e');
next_month_ending=intnx('month',today(),1,'e');
last_2months=intnx('month',today(),-2);
lastmonth_endof_before_date=intnx('month',today(),-1,'e')-1;

format lastmonth_endof_before_date  last_2months next_month_ending samedate  thismonth_begin nextmonth_begin prev_month_ending prev_month:           date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;lastmonth_endof_before_date=intnx('month',today(),-1,'e')-1;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 11:26:51 GMT</pubDate>
    <dc:creator>BrahmanandaRao</dc:creator>
    <dc:date>2023-04-21T11:26:51Z</dc:date>
    <item>
      <title>last month before date of end of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871063#M344075</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data n;
lastmonth_endof_before_date=intnx('day',(today()-1)-1,'e');
format lastmonth_endof_before_date    date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to get last month before date of end of the month&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ex: last month end is 31March2023 i am trying 30March2023 date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871063#M344075</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2023-04-21T11:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: last month before date of end of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871064#M344076</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
lastmonth_endof_before_date=intnx('month',today(),0,'e')-1;
put lastmonth_endof_before_date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871064#M344076</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T11:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: last month before date of end of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871065#M344077</link>
      <description>&lt;P&gt;Add a -1 to your expression. SAS Dates are just integers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871065#M344077</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2023-04-21T11:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: last month before date of end of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871066#M344078</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data n;
samedate=intnx('month',today(),0,'s');
prev_month=intnx('month',today(),-1,'s');
thismonth_begin=intnx('month',today(),0,'b');
nextmonth_begin=intnx('month',today(),1,'b');
prev_month_ending=intnx('month',today(),-1,'e');
next_month_ending=intnx('month',today(),1,'e');
last_2months=intnx('month',today(),-2);
lastmonth_endof_before_date=intnx('month',today(),-1,'e')-1;

format lastmonth_endof_before_date  last_2months next_month_ending samedate  thismonth_begin nextmonth_begin prev_month_ending prev_month:           date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;lastmonth_endof_before_date=intnx('month',today(),-1,'e')-1;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871066#M344078</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2023-04-21T11:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: last month before date of end of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871069#M344080</link>
      <description>&lt;P&gt;right &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but you get the point &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-month-before-date-of-end-of-month/m-p/871069#M344080</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T11:40:10Z</dc:date>
    </item>
  </channel>
</rss>

