<?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: Conflicting Ages Generated using INTCK in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426237#M281263</link>
    <description>What about INTCK with the AGE option?</description>
    <pubDate>Tue, 09 Jan 2018 20:57:50 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-09T20:57:50Z</dc:date>
    <item>
      <title>Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426231#M281262</link>
      <description>&lt;P&gt;Hi All, I'm attempting to calculate age at Event (1st vaccination) for a data set I'm using. I've used this forum to find several different ways to calculate age at event, however, they all result in different values. I'm hoping to find out which of these calculations represents the true age at vaccination for this population.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A few details- I calculated participants age at the start of the study ( 12-1-2016), which gave me an age range of 7-21 yrs ( Agetest). I'm using version 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to exclude anyone who received a vaccination before age 9. Now, when I attempt to calculate participants' age at first vaccination ( Event), I get different values for how many are actually &amp;lt;9 at the event. With the coding below I get participants age at event as between 0-21. I'm assuming that some clinics erroneously listed the participant's dob and vaccination date as the same. What am I missing about this code that would explain these differences and which code reflects an accurate count at each age?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code I've used thus far;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want; set have; today=MDY(12,01,2016);&lt;/P&gt;&lt;P&gt;days=today-BIRTH_DATE;&lt;/P&gt;&lt;P&gt;AGEtest= floor ((intck('month',BIRTH_DATE,today) - (day(today) &amp;lt; day(BIRTH_DATE))) / 12);*age at study start;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AgeatVacc=INTCK ('YEAR', BIRTH_DATE, CHVaccDate_1);run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AgeVtest=floor ((intck('month',BIRTH_DATE,CHVaccDate_1) - (day(CHVaccDate_1) &amp;lt; day(BIRTH_DATE))) / 12); *age at first vacc date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AgeVtest2=floor ((intck('month',BIRTH_DATE,CHVaccDate_1)) / 12);*looking at diff btw birth date and 1st vacc date- gives different answers;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AgeVTest5=floor ((intck('YEAR',BIRTH_DATE, CHVaccDate_1))); RUN;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426231#M281262</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-09T20:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426237#M281263</link>
      <description>What about INTCK with the AGE option?</description>
      <pubDate>Tue, 09 Jan 2018 20:57:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426237#M281263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-09T20:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426238#M281264</link>
      <description>&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean something like&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;AgeatEvent =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;INTCK('year',dob,eventdate,"Age") ? This generates missing values for the data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426238#M281264</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-09T21:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426240#M281265</link>
      <description>&lt;P&gt;How about going back to basics, i.e. The Manual&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;The continuous method is useful for calculating anniversaries. For example, you can calculate the number of years a couple is married by executing the following program: 

data b;
   WeddingDay='14feb2000'd;
   Today=today();
   YearsMarried=intck('YEAR', WeddingDay, today(), 'C');
   format WeddingDay Today date9.;
run;

proc print data=b;
run;

The results are WeddingDay=14FEB2000, Today=01OCT2012, and YearsMarried=12. 
&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426240#M281265</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-01-09T21:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426241#M281266</link>
      <description>&lt;P&gt;INTCK is tricky, and not a good idea for calculating AGE.&amp;nbsp; It counts the number of boundaries crossed, not the number of intervals.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;age = intck('year', '28dec2016'd, '02jan2017'd);&amp;nbsp; ==&amp;gt; 1, because 1 instance of January 1st is encountered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;age = intck('year', '02jan2017'd, '31dec2017'd); ==&amp;gt; 0, because 0 instances of January 1st are encountered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might find it easier to just count days.&amp;nbsp; For example, an approximate formula would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if (CHVaccDate_1 - BIRTH_DATE) &amp;lt; (365 * 7) + (366 * 2) then delete;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you can experiment with a different function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if CHVaccDate_1 &amp;lt; intnx('year', BIRTH_DATE, 9, 'same') then delete;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If haven't really tested that last one sufficiently, but there is definitely a combination that would work using INTNX.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426241#M281266</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-01-09T21:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426244#M281267</link>
      <description>&lt;P&gt;INTCK("YEAR", d1, d2, "CONTINUOUS") uses d1 as the year boundary, so it does calculate age (in years) appropriately.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426244#M281267</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-01-09T21:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426246#M281268</link>
      <description>&lt;P&gt;Excellent!&amp;nbsp; Time for me to play with my new toy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;solution works like a charm.&amp;nbsp; One sample test program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;do d='14feb2016'd to '01mar2016'd;&lt;/P&gt;
&lt;P&gt;age = intck('year', '20feb2015'd, d, 'continuous');&lt;/P&gt;
&lt;P&gt;output;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;proc print data=test;&lt;/P&gt;
&lt;P&gt;title 'Start = February 20, 2015';&lt;/P&gt;
&lt;P&gt;format d date9.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426246#M281268</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-01-09T21:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426295#M281269</link>
      <description>This solution doesn't work because each event "wedding" date is different for each participant. This method works for calculating age of participant at study start, which I have used successfully.</description>
      <pubDate>Wed, 10 Jan 2018 01:52:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426295#M281269</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T01:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426300#M281270</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185727"&gt;@LAsasuser79&lt;/a&gt; wrote:&lt;BR /&gt;This solution doesn't work because each event "wedding" date is different for each participant. This method works for calculating age of participant at study start, which I have used successfully.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work, assuming you used two variables, please explain how it "doesn't work".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 02:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426300#M281270</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-10T02:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426302#M281271</link>
      <description>&lt;P&gt;If you're on at least 9.3, I'd used the yrdif function. e.g.:&lt;/P&gt;
&lt;PRE&gt;age=YRDIF(start-date,end-date);&lt;/PRE&gt;
&lt;P&gt;There is a third parameter you can add, but age is the default for that parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 03:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426302#M281271</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-10T03:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426335#M281272</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185727"&gt;@LAsasuser79&lt;/a&gt; wrote:&lt;BR /&gt;This solution doesn't work because each event "wedding" date is different for each participant. This method works for calculating age of participant at study start, which I have used successfully.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's time to post some example data in a data step. Right now we're fishing in the dark with respect to your data and have to make up things.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 08:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426335#M281272</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T08:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426390#M281273</link>
      <description>&lt;P&gt;HI Reeeza,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works for calculating age at study start, which is the same start date for all participants. The output gives me the age in years for each participant.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want; set have;&lt;/P&gt;&lt;P&gt;today=MDY(12,01,2016);&lt;/P&gt;&lt;P&gt;days=today-BIRTH_DATE;&lt;/P&gt;&lt;P&gt;AGEtest= floor ((intck('month',BIRTH_DATE,today) - (day(today) &amp;lt; day(BIRTH_DATE))) / 12);*age at study start;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, what I am trying to calculate is participant's age at first vaccination, which differs for each participant. Therefore, I can't plug in a date rage for the interval to check against in order to count age correctly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 12:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426390#M281273</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T12:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426402#M281274</link>
      <description>&lt;P&gt;UPDATED with data lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kurt,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I calculate age at study start (Age Test) and most importantly age at first vaccination(VAGE). The issue I'm running into is age at first vaccination as it gives me an age range of 0-18, which isn't true based on the age of my sample ( 7-21). I've attached the output for the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Inas.hpvdata1; set Inas.hpvdata1;&lt;/P&gt;&lt;P&gt;today=MDY(12,01,2016);&lt;/P&gt;&lt;P&gt;days=today-BIRTH_DATE;&lt;/P&gt;&lt;P&gt;AGEtest= floor ((intck('month',BIRTH_DATE,today) - (day(today) &amp;lt; day(BIRTH_DATE))) / 12);*age at study start;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAGE= INTCK('year',BIRTH_DATE,CHVaccDate_1,"Continuous");run; proc freq; table AGEtest VAGE;run;&lt;/P&gt;&lt;P&gt;proc freq; table AGEtest VAGE;run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input CLIENT_ID BIRTH_DATE&amp;nbsp; ddmmyy10. CHVaccDate_1 mmddyy10.;&lt;/P&gt;&lt;P&gt;data lines;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1, 08212000, 04062009&lt;/P&gt;&lt;P&gt;2,02232002,&amp;nbsp; 04082011&lt;/P&gt;&lt;P&gt;3,05101999, 11222010&lt;/P&gt;&lt;P&gt;4,10191999, 03052012&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 12:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426402#M281274</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T12:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426407#M281275</link>
      <description>&lt;P&gt;Quote from myself:&lt;/P&gt;
&lt;P&gt;"post some example data in a data step".&lt;/P&gt;
&lt;P&gt;Don't expect us to type data from &lt;U&gt;&lt;EM&gt;pictures&lt;/EM&gt;&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;And I only risked to open your Word document because I have LibreOffice at hand, which reduces the risk of malware somewhat. Many of the people here won't be able to access a docx because their firewalls block Office files.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 12:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426407#M281275</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426416#M281276</link>
      <description>&lt;P&gt;Noted. I've updated the post with a few data lines.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 12:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426416#M281276</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T12:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426424#M281277</link>
      <description>&lt;P&gt;What are you trying to calculate here:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;AGEtest= floor ((intck('month',BIRTH_DATE,today) - (day(today) &amp;lt; day(BIRTH_DATE))) / 12);*age at study start;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is no variable today in your whole process, so it only yields missing values.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426424#M281277</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T13:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426425#M281278</link>
      <description>&lt;P&gt;After playing around with it, I arrived at this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input CLIENT_ID BIRTH_DATE :mmddyy10. CHVaccDate_1 :mmddyy10.;
VAGE = INTCK('year',BIRTH_DATE,CHVaccDate_1,"Continuous");
format BIRTH_DATE CHVaccDate_1 mmddyy10.;
datalines; 
1 08212000 04062009
2 02032002 04082011
3 05101999 11222010
4 10191999 03052012
;
run;

proc freq;
table VAGE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Run this and see if it meets your expectations.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426425#M281278</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T13:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426434#M281279</link>
      <description>&lt;P&gt;Here I'm calculating the age of my sample at the start of the study. This code works to do that. I believe my value for today was included in the code I pasted.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426434#M281279</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T13:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426436#M281280</link>
      <description>&lt;P&gt;I did try this code earlier. My question was related to which of the INTCK code options will give the most accurate age, since they all slightly differed. I am going to use this option with the continuous option as the most valid response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426436#M281280</guid>
      <dc:creator>LAsasuser79</dc:creator>
      <dc:date>2018-01-10T13:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Ages Generated using INTCK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426439#M281281</link>
      <description>&lt;P&gt;OK, saw it.&lt;/P&gt;
&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input CLIENT_ID BIRTH_DATE :mmddyy10. CHVaccDate_1 :mmddyy10.;
today=MDY(12,01,2016);
AGEtest= floor ((intck('month',BIRTH_DATE,today) - (day(today) &amp;lt; day(BIRTH_DATE))) / 12);*age at study start;
agetest1 = intck('year',BIRTH_DATE,today,'c');
VAGE = INTCK('year',BIRTH_DATE,CHVaccDate_1,"Continuous");
format BIRTH_DATE CHVaccDate_1 mmddyy10.;
datalines; 
1 08212000 04062009
2 02032002 04082011
3 05101999 11222010
4 10191999 03052012
;
run;

proc freq;
table agetest agetest1 VAGE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;At least for the set of test data, both calculations for agetest resolve to the same value, and vage also looks correct.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conflicting-Ages-Generated-using-INTCK/m-p/426439#M281281</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T13:43:23Z</dc:date>
    </item>
  </channel>
</rss>

