<?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 Date comparison in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Date-comparison/m-p/62565#M17792</link>
    <description>I have data that has service-from and service-to dates. If all of the dates for a particular client are unique, I want to delete them, however, if there is any overlap, I need to keep them. One way that I thought of was to create an array, but I'm not good with those. Any other suggestions?</description>
    <pubDate>Fri, 21 Nov 2008 14:27:15 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-11-21T14:27:15Z</dc:date>
    <item>
      <title>Date comparison</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-comparison/m-p/62565#M17792</link>
      <description>I have data that has service-from and service-to dates. If all of the dates for a particular client are unique, I want to delete them, however, if there is any overlap, I need to keep them. One way that I thought of was to create an array, but I'm not good with those. Any other suggestions?</description>
      <pubDate>Fri, 21 Nov 2008 14:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-comparison/m-p/62565#M17792</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-21T14:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-comparison/m-p/62566#M17793</link>
      <description>If your data has one service-from/to pair on each observation, and the dates is all you want to keep, my suggestion is to sort your data in client and service-from (and service-to if necessary) order. &lt;BR /&gt;
Then use RETAIN or LAG() to compare the current service-from with previous service-tom date. If overlap output the columns you want to keep.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Linus</description>
      <pubDate>Fri, 21 Nov 2008 15:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-comparison/m-p/62566#M17793</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-11-21T15:22:06Z</dc:date>
    </item>
  </channel>
</rss>

