<?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 Question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981617#M379154</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208051"&gt;@YannRC&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You must not apply the DATEPART function to date values (like TODAY()), only to &lt;EM&gt;datetime&lt;/EM&gt; values such as&amp;nbsp;&lt;SPAN&gt;DATE_DER_EVT. Otherwise, a number of &lt;EM&gt;days&lt;/EM&gt; since 1 Jan 1960 (TODAY()=24113 on 7 Jan 2026) is interpreted as a number of &lt;EM&gt;seconds&lt;/EM&gt; since 1 Jan 1960 00:00:00 (24113 seconds = 6:41:53 h) and the datepart of the resulting datetime value equals '01JAN1960'd (=0). This is why you got the number of weekdays from 1 Jan 1960 to DATE_DER_EVT:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;INTCK('WEEKDAY','&lt;STRONG&gt;01JAN1960&lt;/STRONG&gt;'d,'07JAN2026'd)=17223&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2026 11:30:27 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2026-01-07T11:30:27Z</dc:date>
    <item>
      <title>INTCK Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981616#M379153</link>
      <description>&lt;P&gt;Hello, I’m trying to measure a time interval between two dates in business days. I know I’m supposed to use the INTCK function, but I don’t understand what it is actually calculating. It gives me a result of 1700, which doesn’t make sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's the difference between DATE_DER_EVT and today. I have used this synthax :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INTCK('WEEKDAY',DATEPART(TODAY()),DATEPART(t1.DATE_DER_EVT))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can help me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YannRC_0-1767783667300.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112524i8AFE64AB8A2A0233/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YannRC_0-1767783667300.png" alt="YannRC_0-1767783667300.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 11:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981616#M379153</guid>
      <dc:creator>YannRC</dc:creator>
      <dc:date>2026-01-07T11:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981617#M379154</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208051"&gt;@YannRC&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You must not apply the DATEPART function to date values (like TODAY()), only to &lt;EM&gt;datetime&lt;/EM&gt; values such as&amp;nbsp;&lt;SPAN&gt;DATE_DER_EVT. Otherwise, a number of &lt;EM&gt;days&lt;/EM&gt; since 1 Jan 1960 (TODAY()=24113 on 7 Jan 2026) is interpreted as a number of &lt;EM&gt;seconds&lt;/EM&gt; since 1 Jan 1960 00:00:00 (24113 seconds = 6:41:53 h) and the datepart of the resulting datetime value equals '01JAN1960'd (=0). This is why you got the number of weekdays from 1 Jan 1960 to DATE_DER_EVT:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;INTCK('WEEKDAY','&lt;STRONG&gt;01JAN1960&lt;/STRONG&gt;'d,'07JAN2026'd)=17223&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 11:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981617#M379154</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2026-01-07T11:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981637#M379157</link>
      <description>&lt;P&gt;Perfect !!&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 15:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981637#M379157</guid>
      <dc:creator>YannRC</dc:creator>
      <dc:date>2026-01-07T15:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981638#M379158</link>
      <description>&lt;P&gt;You asked to calculate the number of week days since the start of 1960 of instead today's date.&amp;nbsp; Dividing a date value by the number of seconds in a day almost always results in a value of zero.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INTCK('WEEKDAY',TODAY(),DATEPART(t1.DATE_DER_EVT))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the easiest fix is to use the DTWEEKDAY interval instead so you can work with the existing datetime values.&amp;nbsp; Make sure to pass a valid datetime value as the reference value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INTCK('DTWEEKDAY',DATETIME(),t1.DATE_DER_EVT)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  do days=1 to 20 ;
    timestamp=intnx('dtweekday',datetime(),-days,'s');
    output;
  end;
  format timestamp datetime19.;
run;

data want;
  set have;
  edays = intck('dtweekday',timestamp,datetime());
run;

proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 15:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-Question/m-p/981638#M379158</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-01-07T15:51:13Z</dc:date>
    </item>
  </channel>
</rss>

