<?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: Subtraction between 2 different date formats in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175049#M44932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was very helpful and it solved the problem. Thank you for your time. I really appreciate the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Nov 2014 16:18:26 GMT</pubDate>
    <dc:creator>sanketshah07</dc:creator>
    <dc:date>2014-11-18T16:18:26Z</dc:date>
    <item>
      <title>Subtraction between 2 different date formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175046#M44929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am dealing with a situation where I have 2 different date formats. One is a full date formatted as yymmdd8. The other is just a year formatted as BEST12. I need to do a subtraction to calculate age at the event and select cases higher than a certain age. Please advise a solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 01:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175046#M44929</guid>
      <dc:creator>sanketshah07</dc:creator>
      <dc:date>2014-11-18T01:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Subtraction between 2 different date formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175047#M44930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way is to transform &lt;STRONG&gt;YEAR&lt;/STRONG&gt; into a SAS date, say the first of April of that year with &lt;STRONG&gt;MDY(4, 1, YEAR)&lt;/STRONG&gt; and then use function &lt;STRONG&gt;YRDIF&lt;/STRONG&gt; to calculate the age. Assuming &lt;STRONG&gt;DATE&lt;/STRONG&gt; is greater than &lt;STRONG&gt;MDY(4, 1, YEAR)&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if yrdif( mdy(4, 1, year), date, "AGE" ) &amp;gt; ageLimit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 03:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175047#M44930</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-11-18T03:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Subtraction between 2 different date formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175048#M44931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You just need to define what your algorithm is for defining age at event.&amp;nbsp; The simplest is to just use the year from the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;age_at_event = year(event_date) - year_of_birth ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 05:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175048#M44931</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-18T05:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Subtraction between 2 different date formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175049#M44932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was very helpful and it solved the problem. Thank you for your time. I really appreciate the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 16:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtraction-between-2-different-date-formats/m-p/175049#M44932</guid>
      <dc:creator>sanketshah07</dc:creator>
      <dc:date>2014-11-18T16:18:26Z</dc:date>
    </item>
  </channel>
</rss>

