<?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: calculating age   difference  between SAS and SPSS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278812#M56120</link>
    <description>&lt;P&gt;good catch. INTCK shjould be includded.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2016 19:50:02 GMT</pubDate>
    <dc:creator>archibald</dc:creator>
    <dc:date>2016-06-20T19:50:02Z</dc:date>
    <item>
      <title>calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278765#M56108</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Using this syntax in SAS&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="lia-search-match-lithium"&gt;&lt;STRONG&gt;Age&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;= (&lt;/SPAN&gt;graduationdate-dob)/365.25;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and using the equivalent in spss&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Compute &lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN class="lia-search-match-lithium"&gt;&lt;STRONG&gt;Age&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;= (&lt;/SPAN&gt;graduationdate-dob)/365.25.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I get the same exact result. In SPSS, the present code takes into account leap year.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;but the issue is&amp;nbsp; in SAS to accurately calculate age&amp;nbsp;while taking &amp;nbsp;into&amp;nbsp;acount leap year &amp;nbsp;the folllowing should be used&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="lia-search-match-lithium"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; syntax 3- Age&lt;/STRONG&gt;&lt;/SPAN&gt;= ('year' dob, graduationdate, 'continuous') &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;OR &lt;SPAN class="lia-search-match-lithium"&gt;&lt;STRONG&gt;syntax 3-&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="lia-search-match-lithium"&gt;&lt;STRONG&gt;Age&lt;/STRONG&gt;&lt;/SPAN&gt;= &amp;nbsp;intck('year', dob, graduationdate) - (put(dob, mmddyy4.) &amp;gt; put(graduationdate, mmddyy4.)). &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;However&amp;nbsp;&amp;nbsp;results&amp;nbsp; from&amp;nbsp; syntax3 or syntax4&amp;nbsp; are not similar to that of the SPSS code.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know why this&amp;nbsp; discrepancy? thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 17:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278765#M56108</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-06-20T17:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278769#M56109</link>
      <description>&lt;P&gt;What SPSS code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 18:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278769#M56109</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-20T18:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278775#M56111</link>
      <description>Compute Age= (graduationdate-dob)/365.25.</description>
      <pubDate>Mon, 20 Jun 2016 18:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278775#M56111</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-06-20T18:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278785#M56113</link>
      <description>&lt;P&gt;Syntax 3 should be&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-search-match-lithium"&gt;Age&amp;nbsp;&lt;/SPAN&gt;= &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#993300"&gt;INTCK&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;('year'&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#993300"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt; &lt;/U&gt;dob, graduationdate, 'continuous')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dividing the number of days by 365.25 will give you the correct age sometimes but definitely not always.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 18:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278785#M56113</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-20T18:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278800#M56119</link>
      <description>&lt;P&gt;Then the SPSS code is not accounting for leap years. It is approximately, but not exactly so your SPSS numbers will be incorrect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is question was also asked yesterday,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/compute-age-from-two-dates/m-p/278508/highlight/true#M56028" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/compute-age-from-two-dates/m-p/278508/highlight/true#M56028&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theres some links there that go over the differences between the methods and which one is correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 19:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278800#M56119</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-20T19:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: calculating age   difference  between SAS and SPSS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278812#M56120</link>
      <description>&lt;P&gt;good catch. INTCK shjould be includded.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 19:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-age-difference-between-SAS-and-SPSS/m-p/278812#M56120</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-06-20T19:50:02Z</dc:date>
    </item>
  </channel>
</rss>

