<?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 to compute age in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271517#M269476</link>
    <description>&lt;P&gt;May also want to investigate YRDIF with the 'ACT/ACT' option.&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 19:25:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-05-18T19:25:05Z</dc:date>
    <item>
      <title>INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271485#M269474</link>
      <description>&lt;P&gt;Method 1: Age=FLOOR((INTCK('month',dob,eventdate)-(day(eventdate)&amp;lt;day(dob)))/12)&lt;/P&gt;&lt;P&gt;Method 2: Age=&amp;nbsp;&lt;SPAN&gt;INTCK('year',dob,eventdate,"Continuous")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi I was wondering if two methods above have the same function on calculating Age based on DOB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 17:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271485#M269474</guid>
      <dc:creator>fbl204653</dc:creator>
      <dc:date>2016-05-18T17:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271496#M269475</link>
      <description>&lt;P&gt;No, the results will differ sometimes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 2 will give you the exact age.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 1 will sometimes give you the wrong result when eventdate occurs in the same month as dob.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 18:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271496#M269475</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-18T18:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271517#M269476</link>
      <description>&lt;P&gt;May also want to investigate YRDIF with the 'ACT/ACT' option.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 19:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271517#M269476</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-18T19:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271523#M269477</link>
      <description>&lt;P&gt;Hi PG,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried one example, somehow, two methods&amp;nbsp;gave me the same result (see age and age2).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro age(date,birth);&lt;BR /&gt;floor ((intck('month',&amp;amp;birth,&amp;amp;date) - (day(&amp;amp;date) &amp;lt; day(&amp;amp;birth))) / 12)&lt;BR /&gt;%mend age;&lt;/P&gt;&lt;P&gt;data c;&lt;BR /&gt;WeddingDay='19may2000'd;&lt;BR /&gt;Today='18MAY2016'd;&lt;BR /&gt;age=%age(Today,WeddingDay);&lt;BR /&gt;age1=intck('year',WeddingDay,Today,"D");&lt;BR /&gt;age2=intck('year',WeddingDay,Today,"C");&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 19:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271523#M269477</guid>
      <dc:creator>fbl204653</dc:creator>
      <dc:date>2016-05-18T19:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271529#M269478</link>
      <description>&lt;P&gt;YRDIF actually accepts "AGE" as third argument and returns an age with a fractional part. So&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;floor(YRDIF(birthDate, today(),"AGE"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is another way to get the current age in years.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 20:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271529#M269478</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-18T20:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK to compute age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271533#M269479</link>
      <description>thanks a lot</description>
      <pubDate>Wed, 18 May 2016 20:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-to-compute-age/m-p/271533#M269479</guid>
      <dc:creator>fbl204653</dc:creator>
      <dc:date>2016-05-18T20:31:34Z</dc:date>
    </item>
  </channel>
</rss>

