<?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 INTCK in open code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476461#M122626</link>
    <description>&lt;P&gt;If you really want to compute number of months between two dates, I would suggest using MONTH instead of QUARTER as the first argument to INTCK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would be much safer using four-digit years.&amp;nbsp; System options can affect whether 1803 is interpreted as 201803 or 191803.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jul 2018 14:08:28 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-07-09T14:08:28Z</dc:date>
    <item>
      <title>Use INTCK in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476353#M122585</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I want to calculate number of months between two dates and keep it as a sas macro variable.&lt;/P&gt;&lt;P&gt;Do you know how to do it in open code?&lt;/P&gt;&lt;P&gt;%let start=1612;&amp;nbsp;&lt;BR /&gt;%let end=1803;&lt;/P&gt;&lt;P&gt;%let date_start=%sysfunc(inputn(&amp;amp;start.,yymmn4.));&lt;BR /&gt;%let date_end=%sysfunc(inputn(&amp;amp;end.,yymmn4.));&lt;/P&gt;&lt;P&gt;%let n=&lt;SPAN&gt;%sysfunc(&lt;/SPAN&gt;intck('QUARTER',&amp;amp;date_start.,&amp;amp;date_end.)) ;&lt;/P&gt;&lt;P&gt;I get warning&lt;/P&gt;&lt;P&gt;WARNING: An argument to the function INTCK referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to do it in non open code:&lt;/P&gt;&lt;P&gt;Data _null_;&lt;BR /&gt;n=intck('QUARTER',&amp;amp;date_start.,&amp;amp;date_end.);&lt;BR /&gt;Call Symput ('n',n);&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;n.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 05:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476353#M122585</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-09T05:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use INTCK in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476358#M122588</link>
      <description>&lt;P&gt;Macro language is text-only, so quotes are not needed around strings:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=%sysfunc(intck(QUARTER,&amp;amp;date_start.,&amp;amp;date_end.)) ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2018 05:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476358#M122588</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-09T05:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Use INTCK in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476461#M122626</link>
      <description>&lt;P&gt;If you really want to compute number of months between two dates, I would suggest using MONTH instead of QUARTER as the first argument to INTCK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would be much safer using four-digit years.&amp;nbsp; System options can affect whether 1803 is interpreted as 201803 or 191803.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 14:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-INTCK-in-open-code/m-p/476461#M122626</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-09T14:08:28Z</dc:date>
    </item>
  </channel>
</rss>

