<?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: AGE IN MONTHS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775894#M246663</link>
    <description>&lt;P&gt;You are already using the&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1md4mx2crzfaqn14va8kt7qvfhr.htm" target="_self"&gt;INTCK Function&lt;/A&gt;&amp;nbsp;and specifying "MONTH" as the interval so why divide by 12?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Oct 2021 15:29:41 GMT</pubDate>
    <dc:creator>AMSAS</dc:creator>
    <dc:date>2021-10-22T15:29:41Z</dc:date>
    <item>
      <title>AGE IN MONTHS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775889#M246660</link>
      <description>&lt;P&gt;hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to calculate age as the number of total months as of a specific date. But I am getting the number of years. Please help me to fix this issue?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA  AGE_MONTHS;
SET TEST;
TODAY = MDY(03,31,2021);
DAYS = TODAY - Launch_Date;
AGE=FLOOR((INTCK('month',Launch_Date,TODAY) - (DAY(TODAY) &amp;lt; DAY(Launch_Date))) / 12);
RUN;&lt;/PRE&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;sara&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 15:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775889#M246660</guid>
      <dc:creator>saraphdnz</dc:creator>
      <dc:date>2021-10-22T15:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: AGE IN MONTHS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775894#M246663</link>
      <description>&lt;P&gt;You are already using the&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1md4mx2crzfaqn14va8kt7qvfhr.htm" target="_self"&gt;INTCK Function&lt;/A&gt;&amp;nbsp;and specifying "MONTH" as the interval so why divide by 12?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 15:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775894#M246663</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-10-22T15:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: AGE IN MONTHS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775922#M246669</link>
      <description>&lt;P&gt;You may want to consider use of the INTCK method option='C' such as&lt;/P&gt;
&lt;PRE&gt;INTCK('month',Launch_Date,TODAY,'C')&lt;/PRE&gt;
&lt;P&gt;The default of 'D' or discrete may not yield quite what you want.&lt;/P&gt;
&lt;P&gt;Consider this example:&lt;/P&gt;
&lt;PRE&gt;data example;
   date1 = '18Mar2021'd;
   date2 = '02Jul2021'd;
   default = intck('month',date1,date2);
   cont    = intck('month',date1,date2,'C');
run;&lt;/PRE&gt;
&lt;P&gt;Decide what you would expect to be the number of months between those two dates (think perhaps of date1 as a date of birth and the other the date of some service). Then run the code and pick the appropriate version.&lt;/P&gt;
&lt;P&gt;I used two close together dates intentionally so you can decide before running the code.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 05:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775922#M246669</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-23T05:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: AGE IN MONTHS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775994#M246702</link>
      <description>&lt;P&gt;THANKS HEAPS.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 02:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-IN-MONTHS/m-p/775994#M246702</guid>
      <dc:creator>saraphdnz</dc:creator>
      <dc:date>2021-10-23T02:44:39Z</dc:date>
    </item>
  </channel>
</rss>

