<?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: INTCK Function Problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534975#M146845</link>
    <description>&lt;P&gt;Cool stuff. Thank you both &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Feb 2019 19:48:34 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-02-12T19:48:34Z</dc:date>
    <item>
      <title>INTCK Function Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534829#M146809</link>
      <description>&lt;P&gt;Hi All.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you perhaps offer some knowledge here? Why does this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   start='01feb2016'd;
   end='29feb2016'd;
   numMondays=intck('weekday134567w' ,start, end);
   put numMondays;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;not result in numMondays=5?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Browsing the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p1md4mx2crzfaqn14va8kt7qvfhr.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;INTCK Documentation&lt;/A&gt; and &lt;A href="https://documentation.sas.com/?docsetId=leforinforref&amp;amp;docsetTarget=p0g056g35ez8son1sfavozh0lfb3.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1d3z2e1f8u8drn1j70702vf4q3h" target="_self"&gt;Intervals Available to the Function&lt;/A&gt;, I would think that this gives me the number of 1 day week periods, considering Tuesday, Wednesday, Thursday, Friday, Saturday ans Sunday as weekend days = the number of Mondays. However, clearly this is not the case as NumMondays=4 in the code above and there are 5 Mondays in February of 2016.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 13:38:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534829#M146809</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-12T13:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Function Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534835#M146811</link>
      <description>First thing to check:  INTCK captures the number of boundaries crossed.  So if Feb 1 is a Monday it won't be counted.</description>
      <pubDate>Tue, 12 Feb 2019 13:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534835#M146811</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-12T13:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Function Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534840#M146813</link>
      <description>&lt;P&gt;There we go. Thank you! Starring myself blind on this one.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 13:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534840#M146813</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-12T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Function Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534842#M146814</link>
      <description>&lt;P&gt;Just to help with illustrating &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt; 's point, run this for testing:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   start='01feb2016'd;
   end='29feb2016'd;
   numMondays=intck('weekday134567w' ,start, end);
   put numMondays;
run;

data _null_;
   start='31jan2016'd;
   end='29feb2016'd;
   numMondays=intck('weekday134567w' ,start, end);
   put numMondays;
run;

data _null_;
   start='01feb2016'd;
   end='01mar2016'd;
   numMondays=intck('weekday134567w' ,start, end);
   put numMondays;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Only the second step returns 5, as the start is now &lt;EM&gt;before&lt;/EM&gt; a Monday. Moving the end to a Tuesday does not change the result, so the boundary has to be 00:00 on a given day. 29feb is already past that boundary, but 01feb is not before it.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 14:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534842#M146814</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-12T14:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Function Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534975#M146845</link>
      <description>&lt;P&gt;Cool stuff. Thank you both &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 19:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Function-Problem/m-p/534975#M146845</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-12T19:48:34Z</dc:date>
    </item>
  </channel>
</rss>

