<?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 difference in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dates-difference/m-p/94790#M19978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, when you say format, do you mean that the dates are stored as CHAR? If they are stored as SAS dates, the format doesn't matter in the join logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join criteria:&lt;/P&gt;&lt;P&gt;a.cust_id = b.cust_id and b.date between a.date and a.date -30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be aware that you will be noted of that SAS can't optimize these kind of criteria, but if your data isn't too large, it shouldn't be a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2013 15:40:16 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-09-26T15:40:16Z</dc:date>
    <item>
      <title>dates difference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-difference/m-p/94789#M19977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two datasets A &amp;amp;B.The common field between them is cust_id.&lt;/P&gt;&lt;P&gt;Table A have the date filed in format 2013-09-26&amp;nbsp;&amp;nbsp; and table B date filed in format 20130926&lt;/P&gt;&lt;P&gt;How to get records from table B&amp;nbsp; that are 30days prior to date in table A for the same cust id?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 15:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-difference/m-p/94789#M19977</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-09-26T15:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: dates difference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-difference/m-p/94790#M19978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, when you say format, do you mean that the dates are stored as CHAR? If they are stored as SAS dates, the format doesn't matter in the join logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join criteria:&lt;/P&gt;&lt;P&gt;a.cust_id = b.cust_id and b.date between a.date and a.date -30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be aware that you will be noted of that SAS can't optimize these kind of criteria, but if your data isn't too large, it shouldn't be a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 15:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-difference/m-p/94790#M19978</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-09-26T15:40:16Z</dc:date>
    </item>
  </channel>
</rss>

