<?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: Deriving AGE from YEAR of BIRTH in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806188#M1078</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, Thank you so very much.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 04:14:44 GMT</pubDate>
    <dc:creator>Zacc</dc:creator>
    <dc:date>2022-04-06T04:14:44Z</dc:date>
    <item>
      <title>Deriving AGE from YEAR of BIRTH</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806123#M1075</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I do have a variable, year of birth (i.e. without days and months of births). Second, I would like to derive age from the stated variable based on today’s date. I’ve attempted the derivation using the following code but I’ve been unsuccessful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Data myage;
set suvdata;
AGE=floor(YRDIF(RB080, today(),"AGE"));
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I shall be most grateful for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 18:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806123#M1075</guid>
      <dc:creator>Zacc</dc:creator>
      <dc:date>2022-04-05T18:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Deriving AGE from YEAR of BIRTH</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806124#M1076</link>
      <description>&lt;P&gt;The YRDIF function want two date values. So use the MDY function to create date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AGE=floor(YRDIF(mdy(1,1,RB080), today(),"AGE"));&lt;/PRE&gt;
&lt;P&gt;would use January 1 as the date in the year.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 18:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806124#M1076</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-05T18:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Deriving AGE from YEAR of BIRTH</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806125#M1077</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/352245"&gt;@Zacc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, I do have a variable, year of birth (i.e. without days and months of births).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So in other words, you just have the year of birth, is that what you are saying? The value of your variable might look like 1978.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you would compute the age via&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
age = 2022 - rb080;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2022 18:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806125#M1077</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-05T18:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Deriving AGE from YEAR of BIRTH</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806188#M1078</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, Thank you so very much.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 04:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Deriving-AGE-from-YEAR-of-BIRTH/m-p/806188#M1078</guid>
      <dc:creator>Zacc</dc:creator>
      <dc:date>2022-04-06T04:14:44Z</dc:date>
    </item>
  </channel>
</rss>

