<?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: Dates prediction based on ages in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953204#M42825</link>
    <description>&lt;P&gt;Here is code to compute bday_class1. Since I am lazy, I will leave it up to you to write the code for bday_class2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set db;
    bday_class1=intnx('year',date_of_birth,age_of_class1,'s');
    format bday_class1 date9.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2024 11:26:02 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-12-11T11:26:02Z</dc:date>
    <item>
      <title>Dates prediction based on ages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953203#M42824</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;suppose to have the following:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DB;
  input ID :$20. Date_of_Birth :date09. Age_of_class1  Age_of_class2; 
  format Date_of_Birth date9.;
cards;
0001 01JUL1938  85  89
0002 01JUL1977  50  54
0003 01JUL1928  55  60
; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is there a way to get the following?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DB1;
  input ID :$20. Date_of_Birth :date09. Age_of_class1  Age_of_class2 Bday_class1 :date9. Bday_class2 :date9.; 
  format Date_of_Birth date9. Bday_class1 date9. Bday_class2 date9.;
cards;
0001 01JUL1938  85  89  01JUL2023  01JUL2027
0002 01JUL1977  50  54  01JUL2027  01JUL2031
0003 01JUL1928  55  60  01JUL1983  01JUL1988
; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In other words given the birthday date (date_of_birth), how can I get the date (Bday_class1 and Bday_class2) when each ID will have the age shown in Age_of_calss1 and Age_of_class2 variables?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 11:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953203#M42824</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-12-11T11:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dates prediction based on ages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953204#M42825</link>
      <description>&lt;P&gt;Here is code to compute bday_class1. Since I am lazy, I will leave it up to you to write the code for bday_class2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set db;
    bday_class1=intnx('year',date_of_birth,age_of_class1,'s');
    format bday_class1 date9.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 11:26:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953204#M42825</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-12-11T11:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dates prediction based on ages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953236#M42828</link>
      <description>&lt;P&gt;Suggestion: Provide RULES based on values and variable names, not just examples.&lt;/P&gt;
&lt;P&gt;Reasons: 1) Programs are rules.&lt;/P&gt;
&lt;P&gt;2) Code that will duplicate an example may not extend to any other values.&lt;/P&gt;
&lt;P&gt;3) We don't have to guess what the intent is.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 14:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dates-prediction-based-on-ages/m-p/953236#M42828</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-12-11T14:42:40Z</dc:date>
    </item>
  </channel>
</rss>

