<?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 Calculate Age from birthdate to a specific year in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527415#M143888</link>
    <description>&lt;P&gt;I am looking for AGE from a birthdate to a specific year(2008)&amp;nbsp;&amp;nbsp; .......................date formate is MMDDYYYY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so far my query, which giving me the age based on to todays date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Cohort as&lt;BR /&gt;Select *, floor(YRDIF(BENE_BIRTH_DT, today(),"AGE")) as memberAge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions or solutions are highly appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 18:17:33 GMT</pubDate>
    <dc:creator>prjadhav00</dc:creator>
    <dc:date>2019-01-15T18:17:33Z</dc:date>
    <item>
      <title>AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527422#M143779</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I am looking for AGE from a birthdate to a specific year(2008)&amp;nbsp;&amp;nbsp; .......................date formate is MMDDYYYY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so far my query, which giving me the age based on to todays date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Cohort as&lt;BR /&gt;Select *, floor(YRDIF(BENE_BIRTH_DT, today(),"AGE")) as memberAge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions or solutions are highly appreciated.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527422#M143779</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-15T18:26:47Z</dc:date>
    </item>
    <item>
      <title>Calculate Age from birthdate to a specific year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527415#M143888</link>
      <description>&lt;P&gt;I am looking for AGE from a birthdate to a specific year(2008)&amp;nbsp;&amp;nbsp; .......................date formate is MMDDYYYY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so far my query, which giving me the age based on to todays date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Cohort as&lt;BR /&gt;Select *, floor(YRDIF(BENE_BIRTH_DT, today(),"AGE")) as memberAge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions or solutions are highly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527415#M143888</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-15T18:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527431#M143782</link>
      <description>&lt;P&gt;The concept of age to a specific YEAR isn't really clear to me. You can compute age to a specific DATE, but as far as I know, age to a specific YEAR isn't defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what is it that you want?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527431#M143782</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T18:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Age from birthdate to a specific year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527434#M143889</link>
      <description>&lt;P&gt;DUPLICATE THREAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DO NOT REPLY HERE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reply at:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527422#M143779" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527422#M143779&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527434#M143889</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-15T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527437#M143784</link>
      <description>Thanks for getting back to me.&lt;BR /&gt;&lt;BR /&gt;suppose if a person birthday is 12/2/1956 I want to check how much is that&lt;BR /&gt;personage in 2008 or 2010 or any other year.&lt;BR /&gt;&lt;BR /&gt;when I check it's giving me the age of that person based on Today's date&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527437#M143784</guid>
      <dc:creator>prjadhav00</dc:creator>
      <dc:date>2019-01-15T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527460#M143797</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/191254"&gt;@prjadhav00&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for getting back to me.&lt;BR /&gt;&lt;BR /&gt;suppose if a person birthday is 12/2/1956 I want to check how much is that&lt;BR /&gt;personage in 2008 or 2010 or any other year.&lt;BR /&gt;&lt;BR /&gt;when I check it's giving me the age of that person based on Today's date&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;At what day in the year? Age is always dependent upon a given target date. If I am born on 31Dec 2000 I am not 20 years on 1Jan2020, 19 for legal purposes and 19.0027 for biological purposes. On 31Dec2020 I would be 20 years old.&lt;/P&gt;
&lt;P&gt;The YRDIF function with two dates and the third parameter of 'AGE' will give you a continuous age. There are other approaches using the INTCK function but they all are going to want a date to evaluate an age, not just a year.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 19:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527460#M143797</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-15T19:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527464#M143799</link>
      <description>&lt;P&gt;So how old would someone be during the WHOLE of 2008 or 2010 be if they were born on 12/2/1956? And is this date 2 Dec or 12 Feb?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This isn't a trick question. Ages are usually calculated as the number of years from the birth date to today's date. If you want a different calculation please tell us what that is.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 19:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527464#M143799</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-01-15T19:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527632#M143890</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/191254"&gt;@prjadhav00&lt;/a&gt;&amp;nbsp;Please note that I've merged your two posts into one.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 04:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527632#M143890</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-16T04:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: AGE CALCULATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527636#M143893</link>
      <description>&lt;P&gt;I guess what you mean is what age will a person attain during a year.&amp;nbsp; If so, then you simply want the age as of DEC 31 of that year.&amp;nbsp; So for 2008, use the date literal for dec 31, 2008:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
  create table Cohort as
  Select *, floor(YRDIF(BENE_BIRTH_DT,'31dec2008'd,"AGE")) as memberAge
  ...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note I embedded the YRDIF function in the FLOOR function, assuming you want age as integers.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 05:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AGE-CALCULATION/m-p/527636#M143893</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-01-16T05:08:27Z</dc:date>
    </item>
  </channel>
</rss>

