<?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: need to calculate age for people born before 1960 in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495082#M15417</link>
    <description>&lt;P&gt;Ok tested with your sample that you gave us. Here it is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options yearcutoff=1910;
data have;
input bene_id $   b_date  :date9.;          
format b_date date9.;
cards;
01             18May64        
02             18Jun22         
03              08sep51       
;

data want;
set have;
date=today();
Age_exact = floor((intck('month',b_date,Date)-(day(Date) &amp;lt; day(b_date))) / 12);&lt;BR /&gt;format date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Sep 2018 23:34:22 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-09-12T23:34:22Z</dc:date>
    <item>
      <title>need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495077#M15414</link>
      <description>&lt;P&gt;I tried to calculate age using the&amp;nbsp;&lt;/P&gt;&lt;P&gt;current_age=int(yrdif(b_date, today(), 'ACTUAL')); Since the age is before 1960 for bene_id 02, It is giving me negative value.&lt;/P&gt;&lt;P&gt;Here is my data after calculating age:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bene_id&amp;nbsp; &amp;nbsp; b_date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Current_age&lt;/P&gt;&lt;P&gt;01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18May64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 54&lt;/P&gt;&lt;P&gt;02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18Jun22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-3&lt;/P&gt;&lt;P&gt;03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 08sep51&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495077#M15414</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-12T23:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495079#M15415</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Age_exact = floor((intck('month',DOB,&lt;STRONG&gt;Date&lt;/STRONG&gt;)-(day(Date) &amp;lt; day(DOB))) / 12);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;plug in: today() for &lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495079#M15415</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-12T23:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495081#M15416</link>
      <description>&lt;P&gt;I used it as:&lt;/P&gt;&lt;P&gt;age_exact=floor((intck('month', b_date, Date)-(day(Date) &amp;lt; day(b_date)))/12);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I saw both two new variables were empty.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495081#M15416</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-12T23:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495082#M15417</link>
      <description>&lt;P&gt;Ok tested with your sample that you gave us. Here it is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options yearcutoff=1910;
data have;
input bene_id $   b_date  :date9.;          
format b_date date9.;
cards;
01             18May64        
02             18Jun22         
03              08sep51       
;

data want;
set have;
date=today();
Age_exact = floor((intck('month',b_date,Date)-(day(Date) &amp;lt; day(b_date))) / 12);&lt;BR /&gt;format date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495082#M15417</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-12T23:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495083#M15418</link>
      <description>&lt;P&gt;Thanks, but I'm still getting -4 as a value for age_exact.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495083#M15418</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-12T23:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495084#M15419</link>
      <description>&lt;P&gt;Please run the code i gave you. Here is the result. Just run and see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc print data=want noobs;run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;TABLE class="systitleandfootercontainer" border="0" summary="Page Layout" width="100%" frame="void" rules="none" cellspacing="1" cellpadding="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="c systemtitle"&gt;The SAS System&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;BR /&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.WANT" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;bene_id&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;b_date&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;date&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Age_exact&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;01&lt;/TD&gt;
&lt;TD class="r data"&gt;18MAY1964&lt;/TD&gt;
&lt;TD class="r data"&gt;12SEP2018&lt;/TD&gt;
&lt;TD class="r data"&gt;54&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;02&lt;/TD&gt;
&lt;TD class="r data"&gt;18JUN1922&lt;/TD&gt;
&lt;TD class="r data"&gt;12SEP2018&lt;/TD&gt;
&lt;TD class="r data"&gt;96&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;03&lt;/TD&gt;
&lt;TD class="r data"&gt;08SEP1951&lt;/TD&gt;
&lt;TD class="r data"&gt;12SEP2018&lt;/TD&gt;
&lt;TD class="r data"&gt;67&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495084#M15419</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-12T23:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495086#M15420</link>
      <description>&lt;P&gt;Your problem is not that the birth date is before 1960.&amp;nbsp; The problem is that the birth date is after 2018.&lt;/P&gt;
&lt;P&gt;Displaying the dates with only two digits of the year is confusing you, but not SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;                               Current_    current_
Obs    bene_id       b_date      age_x        age

 1        1       18MAY1964        54          54
 2        2       18JUN1922        -3          96
 3        2       18JUN2022        -3          -3
 4        3       08SEP1951        67          67&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495086#M15420</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-12T23:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495087#M15421</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/105450"&gt;@pmpradhan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tried to calculate age using the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;current_age=int(yrdif(b_date, today(), 'ACTUAL')); Since the age is before 1960 for bene_id 02, It is giving me negative value.&lt;/P&gt;
&lt;P&gt;Here is my data after calculating age:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;bene_id&amp;nbsp; &amp;nbsp; b_date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Current_age&lt;/P&gt;
&lt;P&gt;01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18May64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 54&lt;/P&gt;
&lt;P&gt;02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18Jun22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-3&lt;/P&gt;
&lt;P&gt;03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 08sep51&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The most likely issue is that your dates had 2-digit years and when you read them the YEARCUTOFF option assumed the dates you thought were 19xx were actually 20xx.&lt;/P&gt;
&lt;P&gt;Run this code:&lt;/P&gt;
&lt;PRE&gt;proc options option=yearcutoff;
run;&lt;/PRE&gt;
&lt;P&gt;Check the log for the value displayed. Example from mine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; YEARCUTOFF=1926   Specifies the first year of a 100-year span that is used by date informats and
                   functions to read a two-digit year.

&lt;/PRE&gt;
&lt;P&gt;Any year prior to 26 will be treated as 20XX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fix: either use 4 digit years or adjust the year cutoff value with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options yearcutoff=1920; (or similar).&lt;/P&gt;
&lt;P&gt;Caution: if you use 1918 then any births in 2018 are in danger.&lt;/P&gt;
&lt;P&gt;Then reread the data with the two digit years and then reset your yearcutoff option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above is one way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you&amp;nbsp;could test the year of b_date and adjust the birth date:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt; year(b_date) &amp;gt; year(today()) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="2"&gt;then&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt; b_date=intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="SAS Monospace" size="2"&gt;'year'&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;,b_date,-&lt;/FONT&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;100&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;BEFORE calculating the age.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 15:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495087#M15421</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-13T15:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495088#M15422</link>
      <description>It's not because it is before 1960. It is because it is before 1926, which is the default yearcutoff= when using date7. formats. Change the yearcutoff= option to 1910 and it works.</description>
      <pubDate>Wed, 12 Sep 2018 23:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495088#M15422</guid>
      <dc:creator>bobpep212</dc:creator>
      <dc:date>2018-09-12T23:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495089#M15423</link>
      <description>&lt;P&gt;I had&amp;nbsp;created the b_date variable from the date&amp;nbsp;variable birthdate(with&amp;nbsp;datetime.&amp;nbsp;format) using following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;birthdate=datepart(b_date);&lt;BR /&gt;format birthdatef date.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data now looks like this after applying the code you suggested.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;bene_id&lt;/TD&gt;&lt;TD&gt;birthdate&lt;/TD&gt;&lt;TD&gt;b_date&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;18May64:00:06:08&lt;/TD&gt;&lt;TD&gt;18-May-64&lt;/TD&gt;&lt;TD&gt;12-Sep-18&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;18Jun22:00:09:03&lt;/TD&gt;&lt;TD&gt;18-Jun-22&lt;/TD&gt;&lt;TD&gt;12-Sep-18&lt;/TD&gt;&lt;TD&gt;-4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;8Sep51:00:01:06&lt;/TD&gt;&lt;TD&gt;8-Sep-51&lt;/TD&gt;&lt;TD&gt;12-Sep-18&lt;/TD&gt;&lt;TD&gt;67&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495089#M15423</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-12T23:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495091#M15424</link>
      <description>&lt;P&gt;thanks,&amp;nbsp;any suggestion on how to handle the negative age?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495091#M15424</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-12T23:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495092#M15425</link>
      <description>&lt;P&gt;What happens when you use a DATE9 format. I suspect you have a data integrity issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495092#M15425</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-13T00:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495093#M15426</link>
      <description>&lt;P&gt;your negative value is because the second card has jun-18-2022 as the birthdate if you don't set the options&amp;nbsp;yearcutoff=1910;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:03:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495093#M15426</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-13T00:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495098#M15427</link>
      <description>&lt;P&gt;Here is my result from&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc options option=yearcutoff;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS (r) Proprietary Software Release 9.4 TS1M5&lt;/P&gt;&lt;P&gt;YEARCUTOFF=1910 Specifies the first year of a 100-year span that is used by date informats and functions to read a two-digit&lt;BR /&gt;year.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495098#M15427</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-13T00:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495100#M15428</link>
      <description>&lt;P&gt;is the 22 year 1922 or 2022.&amp;nbsp; If 1922 then the options yearcutoff=1910, works correctly.&amp;nbsp; If the person was born in 2022 then you have to wait until they are born to calculate their age.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495100#M15428</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-13T00:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495102#M15429</link>
      <description>&lt;P&gt;Given the age of the population in the dataset I working with. I am thinking it is 1922. I'm still getting negative value after setting the yearcutoff&amp;nbsp;value to 1910. Not sure what else is going on.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495102#M15429</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-13T00:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495104#M15430</link>
      <description>&lt;P&gt;set your options like this global.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options yearcutoff=1910;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495104#M15430</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-13T00:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495105#M15431</link>
      <description>&lt;P&gt;options yearcutoff=1910;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data B;&lt;BR /&gt;set A;&lt;BR /&gt;b_date=datepart(birthdate);&lt;BR /&gt;format b_date date.;&lt;/P&gt;&lt;P&gt;date=today();&lt;BR /&gt;Age_exact = floor((intck('month',b_date,Date)-(day(Date) &amp;lt; day(b_date))) / 12);&lt;BR /&gt;format date date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still getting negative age&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495105#M15431</guid>
      <dc:creator>pmpradhan</dc:creator>
      <dc:date>2018-09-13T00:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495114#M15432</link>
      <description>&lt;P&gt;I think you should post the FULL datetime of the birthdate variable so we know exactly what we are starting with. Also there are easier ways of getting age:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data B;
set A;
b_date=datepart(birthdate);
format b_date date9.
           birthdate datetime24.;
date=today();
Age_exact = floor((intck('month',b_date,Date)-(day(Date) &amp;lt; day(b_date))) / 12);&lt;BR /&gt;Age_Exact2 = intck('YEAR', b_date, date, 'C');
format date date9.;
put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 01:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495114#M15432</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-09-13T01:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: need to calculate age for people born before 1960</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495115#M15433</link>
      <description>&lt;P&gt;&lt;SPAN&gt;What happens when you use a DATE9 format and display the value, before the&amp;nbsp;&lt;/SPAN&gt;calculation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What was your source data? It's possible you read it wrong, but its just as possible you have bad data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/105450"&gt;@pmpradhan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;options yearcutoff=1910;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data B;&lt;BR /&gt;set A;&lt;BR /&gt;b_date=datepart(birthdate);&lt;BR /&gt;format b_date date.;&lt;/P&gt;
&lt;P&gt;date=today();&lt;BR /&gt;Age_exact = floor((intck('month',b_date,Date)-(day(Date) &amp;lt; day(b_date))) / 12);&lt;BR /&gt;format date date9.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still getting negative age&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 00:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/need-to-calculate-age-for-people-born-before-1960/m-p/495115#M15433</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-13T00:56:56Z</dc:date>
    </item>
  </channel>
</rss>

