<?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: Invalid argument to function INTCK('day' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573899#M162087</link>
    <description>&lt;P&gt;A numeric value of 6,588,970 is 31 Dec 19,999. So 20,150,727 would be about year 60,000.&lt;/P&gt;
&lt;P&gt;SAS date values only go to 31 Dec 20000 generally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this code worked previously then the values were different in range. 27Jul2015 would have a numeric non-date formatted&amp;nbsp;value of 20296.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2019 20:15:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-07-16T20:15:21Z</dc:date>
    <item>
      <title>Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573893#M162084</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code has worked for me in the past, but not today. Can you please help suggesting what I'm doing wrong? The output dataset is blank because intck function isn't working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wow;
set check;
if intck('day',letter_date,today())&amp;gt;50 then output; //here letter_date is a column in check- it's a yyyymmdd date with a format of num8.
run;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Logs:&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function INTCK('day',20150727,21746) at line 730 column 6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573893#M162084</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-07-16T15:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573895#M162085</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265086"&gt;@AJ_Brien&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code has worked for me in the past, but not today. Can you please help suggesting what I'm doing wrong? The output dataset is blank because intck function isn't working properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wow;
set check;
if intck('day',letter_date,today())&amp;gt;50 then output; //here letter_date is a column in check- it's a yyyymmdd date with a format of num8.
run;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Logs:&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INTCK('day',20150727,21746) at line 730 column 6.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate the help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It would help if you show us the actual LOG file rather than the code (all of it, not just the error message). And then there will be no inconsistencies between the code in the log and the code you present, as I suspect here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am guessing, but it seems as if your variable letter_date is not an actual SAS date value, it is some integer that looks like a date to humans but does not look like a date to SAS. So, INTCK works only with SAS date values, such as '01JUN2019'd, or integers representing days from Jan 1, 1960.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:27:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573895#M162085</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-16T15:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573896#M162086</link>
      <description>&lt;P&gt;Looks like you have to convert letter date to an actual date value first like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wow;
set check;
if intck('day',input(put(letter_date, 8. -l), yymmdd8.),today())&amp;gt;50 then output;
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:27:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573896#M162086</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-07-16T15:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573899#M162087</link>
      <description>&lt;P&gt;A numeric value of 6,588,970 is 31 Dec 19,999. So 20,150,727 would be about year 60,000.&lt;/P&gt;
&lt;P&gt;SAS date values only go to 31 Dec 20000 generally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this code worked previously then the values were different in range. 27Jul2015 would have a numeric non-date formatted&amp;nbsp;value of 20296.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 20:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573899#M162087</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-16T20:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573912#M162091</link>
      <description>That is correct, I got confused regarding their types and conversions. Thank you!</description>
      <pubDate>Tue, 16 Jul 2019 16:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573912#M162091</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-07-16T16:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function INTCK('day'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573913#M162092</link>
      <description>Yep this worked, I was confused regarding the type conversion. Thank you!</description>
      <pubDate>Tue, 16 Jul 2019 16:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-INTCK-day/m-p/573913#M162092</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-07-16T16:07:06Z</dc:date>
    </item>
  </channel>
</rss>

