<?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: compute  age from 5 dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375524#M90033</link>
    <description>&lt;P&gt;MIN (of birthyear1-birthyear5) will provide the lowest value, ignoring missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend you check what the standard is in your industry.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently demographics uses Age as of June1st for particular years, so if you're merging it with other sources that's a good indicator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I did cancer research we had a different definition, so it can be industry/topic specific.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 22:18:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-07-12T22:18:00Z</dc:date>
    <item>
      <title>compute  age from 5 dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375518#M90031</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need a help in this program.Little complicated. I have 5 dates (Byear1,byear2...-5), I am trying to get a new calculated column (youngest) where I need only the age of the least birthyear (2017-1958). Some birthyear variables are blank.&lt;/P&gt;&lt;P&gt;How to identify the least year from the 5 dates?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table test.age&lt;BR /&gt;as select &amp;nbsp;(2017-(birtyear1)) as Age1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp;(2017-(byear2)) as Age2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;(2017-(byear3)) as Age3,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;(2017-(byear4)) as Age4,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;(2017-(byear5)) as Age5,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output should be like this!&lt;/P&gt;&lt;P&gt;Byear1 &amp;nbsp;Byear2 &amp;nbsp; Byear3 &amp;nbsp;Byear4 &amp;nbsp; Byear5 &amp;nbsp; &amp;nbsp;Age1 &amp;nbsp; Age2 &amp;nbsp;CalculatedCol(youngest) &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1955 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1958 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 62 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;59 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;1962 &amp;nbsp; &amp;nbsp; &amp;nbsp;1965 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1964 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 55 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;52 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;1979 &amp;nbsp; &amp;nbsp; &amp;nbsp;1978 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1962 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 38 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;38 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2017 23:16:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375518#M90031</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-07-16T23:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: compute  age from 5 dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375521#M90032</link>
      <description>&lt;P&gt;You will get more (or maybe at least some) responses if you provide example have and want datasets in the form of data steps we can run. Your examples use different variable names and one can't really see what you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 22:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375521#M90032</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-12T22:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: compute  age from 5 dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375524#M90033</link>
      <description>&lt;P&gt;MIN (of birthyear1-birthyear5) will provide the lowest value, ignoring missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend you check what the standard is in your industry.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently demographics uses Age as of June1st for particular years, so if you're merging it with other sources that's a good indicator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I did cancer research we had a different definition, so it can be industry/topic specific.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 22:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compute-age-from-5-dates/m-p/375524#M90033</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-12T22:18:00Z</dc:date>
    </item>
  </channel>
</rss>

