<?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: How to get the end of previous month in a macro variable using %sysfunc? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311328#M67259</link>
    <description>&lt;P&gt;%let date=%sysfunc(intnx(month, %sysfunc(today()),-1,e), yymmdd10.);&lt;BR /&gt;%put &amp;amp;date.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just remove the single quotation markes from e&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2016 06:43:09 GMT</pubDate>
    <dc:creator>Ravikumarkummari</dc:creator>
    <dc:date>2016-11-14T06:43:09Z</dc:date>
    <item>
      <title>How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311070#M67124</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to get the end of previoius month using this macro, but guess I am missing something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let date=%sysfunc(intnx(month, %sysfunc(today()),-1,'e'), yymmdd10.);&lt;BR /&gt;%put &amp;amp;date.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311070#M67124</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2016-11-11T20:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311071#M67125</link>
      <description>What do you get?</description>
      <pubDate>Fri, 11 Nov 2016 20:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311071#M67125</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-11-11T20:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311074#M67127</link>
      <description>&lt;P&gt;I get the below message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;67 %let date=%sysfunc(intnx(month, %sysfunc(today()),-1,'e'), yymmdd10.);&lt;BR /&gt;WARNING: Argument 4 to function INTNX referenced by the %SYSFUNC or %QSYSFUNC macro function&lt;BR /&gt; is out of range.&lt;BR /&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The&lt;BR /&gt; result of the operations have been set to a missing value.&lt;BR /&gt;68 %put &amp;amp;date.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what I need to do or missing:(&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:27:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311074#M67127</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2016-11-11T20:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311081#M67132</link>
      <description>&lt;P&gt;Without %sysfunc you can calculate date with data step inside the macro program, just as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data _NULL_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;date = today() - day(today());&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;call symput('date', left(date));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with %sysfunc,you can try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %let date = %sysfunc(&amp;nbsp;&lt;SPAN&gt;today() - day(today()) );&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311081#M67132</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-11T20:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311092#M67136</link>
      <description>Get rid of the quote E not 'E'</description>
      <pubDate>Fri, 11 Nov 2016 21:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311092#M67136</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-11-11T21:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311094#M67137</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311094#M67137</guid>
      <dc:creator>renjithr</dc:creator>
      <dc:date>2016-11-11T21:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the end of previous month in a macro variable using %sysfunc?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311328#M67259</link>
      <description>&lt;P&gt;%let date=%sysfunc(intnx(month, %sysfunc(today()),-1,e), yymmdd10.);&lt;BR /&gt;%put &amp;amp;date.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just remove the single quotation markes from e&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 06:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-end-of-previous-month-in-a-macro-variable-using/m-p/311328#M67259</guid>
      <dc:creator>Ravikumarkummari</dc:creator>
      <dc:date>2016-11-14T06:43:09Z</dc:date>
    </item>
  </channel>
</rss>

