<?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: first date of the current month  &amp;amp; last month's first date +1 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436293#M108514</link>
    <description>&lt;P&gt;LIke this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	today="12feb2018"d;
	first=intnx("month", today, -1, "b")+1;
	second=intnx("month", today, 0, "b");

	format today first second date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Feb 2018 17:55:39 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-02-12T17:55:39Z</dc:date>
    <item>
      <title>first date of the current month  &amp; last month's first date +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436289#M108511</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a requirement to check :&amp;nbsp;first date of the current month&amp;nbsp; &amp;amp; last month's first date +1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So today's date is : 2/12/2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the first range as :&amp;nbsp;02/01/2018 ( 2nd jan 2018)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;second range : 01/02/2018 (1st of feb 2018)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET PRE_MO = %SYSFUNC(INTNX(MONTH, %SYSFUNC(&amp;amp;CURR), -1),DATE9.) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting PRE_MO&amp;nbsp; AS&amp;nbsp; :&amp;nbsp;01JAN2018&amp;nbsp; , but I want it be increased by 1&lt;/P&gt;&lt;P&gt;I am trying :&amp;nbsp;R = INTNX(('MONTH',AEENDTC1,0,"BEGINNING")),DATE9. ;&amp;nbsp; &amp;nbsp; ( to get the first day of this month)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But error shows :&amp;nbsp;&lt;/P&gt;&lt;P&gt;R = INTNX(('MONTH',AEENDTC1,0,"BEGINNING")),DATE9. ;&lt;BR /&gt;_ _&lt;BR /&gt;_ _&lt;BR /&gt;_ _&lt;BR /&gt;79 22&lt;BR /&gt;79 22&lt;BR /&gt;79 22&lt;BR /&gt;_&lt;BR /&gt;_&lt;BR /&gt;_&lt;BR /&gt;200&lt;BR /&gt;200&lt;BR /&gt;200&lt;BR /&gt;: Expecting a ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436289#M108511</guid>
      <dc:creator>sayanapex06</dc:creator>
      <dc:date>2018-02-12T17:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: first date of the current month  &amp; last month's first date +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436291#M108512</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET PRE_MO = %eval(%SYSFUNC(INTNX(MONTH, &amp;amp;CURR, -1,b))+1) ;

%put %sysfunc(putn(&amp;amp;pre_mo,date9.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Work with dates (and date-time values) as numbers rather than formatted values whenever possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the formatted values only when absolutely necessary, for example when displaying results for human eyes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436291#M108512</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-02-12T17:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: first date of the current month  &amp; last month's first date +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436293#M108514</link>
      <description>&lt;P&gt;LIke this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	today="12feb2018"d;
	first=intnx("month", today, -1, "b")+1;
	second=intnx("month", today, 0, "b");

	format today first second date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-of-the-current-month-amp-last-month-s-first-date-1/m-p/436293#M108514</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-02-12T17:55:39Z</dc:date>
    </item>
  </channel>
</rss>

