<?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: calculate date someone turned a certain age in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368923#M87991</link>
    <description>&lt;P&gt;Date person turns 6 can be computed with the INTNX function, or just by incrementing the year by 6.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the variables of interest are already SAS date values (am I correct about this?), all you have to do is do the subtraction and you will know the number of days. You could also use INTNX, but subtraction is simpler.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 20:12:08 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2017-06-20T20:12:08Z</dc:date>
    <item>
      <title>calculate date someone turned a certain age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368921#M87990</link>
      <description>&lt;P&gt;I need to calculate when this person turned 6 and then count the the number of days from the servedate to the date he turned six, essentially TurnedSix-Servedate (expressed in days)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data temp;&lt;BR /&gt;infile datalines dsd missover;&lt;BR /&gt;informat dob servedate mmddyy8.;&lt;BR /&gt;input dob servedate;&lt;BR /&gt;cards;&lt;BR /&gt;10/20/10, 01/20/16&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;format dob servedate mmddyy.;&lt;BR /&gt;run;&lt;BR /&gt;data need;&lt;BR /&gt;set temp;&lt;BR /&gt;TurnedSix= ;&lt;BR /&gt;DaysServed= ;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 20:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368921#M87990</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2017-06-20T20:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: calculate date someone turned a certain age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368923#M87991</link>
      <description>&lt;P&gt;Date person turns 6 can be computed with the INTNX function, or just by incrementing the year by 6.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the variables of interest are already SAS date values (am I correct about this?), all you have to do is do the subtraction and you will know the number of days. You could also use INTNX, but subtraction is simpler.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 20:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368923#M87991</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-06-20T20:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculate date someone turned a certain age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368924#M87992</link>
      <description>&lt;P&gt;Use INTNX to increment the birthdate 6 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date_6years = intnx('year', dob, 6, 's');

date_diff = servedate - date_6years;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 20:05:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-date-someone-turned-a-certain-age/m-p/368924#M87992</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-20T20:05:32Z</dc:date>
    </item>
  </channel>
</rss>

