<?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: Date Difference between two datasets in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271093#M15922</link>
    <description>&lt;P&gt;Now for an obnoxious question, does the same medicaid_id exist more than once in either of the files? If not then something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
   create table matched as
   select agency_based.*, self_directed.*, (self_directed.Max_date - agency_based.Min_date) as date_dif
   from  agency_based left join self_directed
      on agency_based.Medicaid_id =  self_directed.Medicaid_id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or sort by data sets and then do a Merge by medicaid_id.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are duplicates of the Id variable then there should be more information to link on such as service or provider or something that makes sense that the min and max are related.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One might also ask if both of these sets are derived from a common base data set? There may be some other approaches if that is the case that would not require creating multiple datasets but allows the same comparison.&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2016 20:23:25 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-05-17T20:23:25Z</dc:date>
    <item>
      <title>Date Difference between two datasets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271066#M15918</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my first dataset which has minimum date(dataset name= agency_based) (column name=min_date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second dataset has maximum date(dataset name= self_directed) (column name=max_date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And i am trying to find difference between these two dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody please help me with this please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Format of the dates is date9. (ddmmmyyyy)&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 19:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271066#M15918</guid>
      <dc:creator>ashwini2</dc:creator>
      <dc:date>2016-05-17T19:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date Difference between two datasets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271083#M15919</link>
      <description>&lt;P&gt;It may help to describe the contents of your datasets more completely. I would think that the Min_date and Max_date are related to something such as an account name, location, person, activity. Then it would make sense to use that identifying information to link the datasets and then compare the date values.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 19:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271083#M15919</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-17T19:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date Difference between two datasets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271086#M15921</link>
      <description>&lt;P&gt;Sorry for that!&lt;/P&gt;&lt;P&gt;Medicaid_id is the common column in both the datasets.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 19:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271086#M15921</guid>
      <dc:creator>ashwini2</dc:creator>
      <dc:date>2016-05-17T19:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date Difference between two datasets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271093#M15922</link>
      <description>&lt;P&gt;Now for an obnoxious question, does the same medicaid_id exist more than once in either of the files? If not then something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
   create table matched as
   select agency_based.*, self_directed.*, (self_directed.Max_date - agency_based.Min_date) as date_dif
   from  agency_based left join self_directed
      on agency_based.Medicaid_id =  self_directed.Medicaid_id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or sort by data sets and then do a Merge by medicaid_id.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are duplicates of the Id variable then there should be more information to link on such as service or provider or something that makes sense that the min and max are related.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One might also ask if both of these sets are derived from a common base data set? There may be some other approaches if that is the case that would not require creating multiple datasets but allows the same comparison.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 20:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-Difference-between-two-datasets/m-p/271093#M15922</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-17T20:23:25Z</dc:date>
    </item>
  </channel>
</rss>

