<?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: use of INTNX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348569#M80729</link>
    <description>&lt;P&gt;You need to tell it that is what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
  date = '01JAN1994'd ;
  next_qtr = intnx('qtr','01jan94'd,1,'middle');
  first_month_of_next_qtr = intnx('month',intnx('qtr','01jan94'd,1,'s'),0,'middle');
  format _all_ yymmdd10.;
  put (_all_) (=/);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;date=1994-01-01&lt;BR /&gt;next_qtr=1994-05-16&lt;BR /&gt;first_month_of_next_qtr=1994-04-15&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 01:17:31 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-04-10T01:17:31Z</dc:date>
    <item>
      <title>use of INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348536#M80726</link>
      <description>&lt;P&gt;data wt;&lt;BR /&gt;datenew=intnx('qtr','01jan94'd,1,'middle');&lt;BR /&gt;format datenew mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its output is coming as&amp;nbsp;&lt;SPAN&gt;05/16/1994 but qarter consists of 3 months so it should be 04/16/1994.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me with this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 18:23:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348536#M80726</guid>
      <dc:creator>s_m</dc:creator>
      <dc:date>2017-04-09T18:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: use of INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348539#M80727</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/136591"&gt;@s_m&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;data wt;&lt;BR /&gt;datenew=intnx('qtr','01jan94'd,1,'middle');&lt;BR /&gt;format datenew mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;its output is coming as&amp;nbsp;&lt;SPAN&gt;05/16/1994 but qarter consists of 3 months so it should be 04/16/1994.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please help me with this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why? The middle of the second quarter (months 4, 5 and 6) is the middle of month 5.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 18:40:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348539#M80727</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-09T18:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: use of INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348543#M80728</link>
      <description>&lt;P&gt;If you want 3 months from the date use MONTH and 3 instead of QTR. Also note that April has 30 days so it would be the 15th NOT the 16th. &amp;nbsp;See the code and output below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;60 data wt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;61 date1=intnx('qtr','01jan94'd,1,'m');&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;62 date2=intnx('MONTH','01jan94'd,3,'m');&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;63 format date: mmddyy10.;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;64&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;65 put "QTR = " date1;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;66 put "Month = " date2;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;67 run;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;QTR = 05/16/1994&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Month = 04/15/1994&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV id="sasLogNote1_1489356544664" class="sasNote"&gt;NOTE: The data set WORK.WT has 1 observations and 2 variables.&lt;/DIV&gt;
&lt;DIV id="sasLogNote2_1489356544664" class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.01 seconds&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 19:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348543#M80728</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-09T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: use of INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348569#M80729</link>
      <description>&lt;P&gt;You need to tell it that is what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
  date = '01JAN1994'd ;
  next_qtr = intnx('qtr','01jan94'd,1,'middle');
  first_month_of_next_qtr = intnx('month',intnx('qtr','01jan94'd,1,'s'),0,'middle');
  format _all_ yymmdd10.;
  put (_all_) (=/);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;date=1994-01-01&lt;BR /&gt;next_qtr=1994-05-16&lt;BR /&gt;first_month_of_next_qtr=1994-04-15&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 01:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/use-of-INTNX/m-p/348569#M80729</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-10T01:17:31Z</dc:date>
    </item>
  </channel>
</rss>

