<?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 Identifying duplicates using a date time variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802326#M33269</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a data set with individuals identified with a unique ID number. There are multiple records for the same individual with different date/time values. I'm trying to identify duplicate records by setting a 12 hour difference as the cutoff between non-duplicate records. Not sure how to calculate the difference between the values related to a single unique ID!&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 19:34:04 GMT</pubDate>
    <dc:creator>Ihsan-Mahdi</dc:creator>
    <dc:date>2022-03-15T19:34:04Z</dc:date>
    <item>
      <title>Identifying duplicates using a date time variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802326#M33269</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a data set with individuals identified with a unique ID number. There are multiple records for the same individual with different date/time values. I'm trying to identify duplicate records by setting a 12 hour difference as the cutoff between non-duplicate records. Not sure how to calculate the difference between the values related to a single unique ID!&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 19:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802326#M33269</guid>
      <dc:creator>Ihsan-Mahdi</dc:creator>
      <dc:date>2022-03-15T19:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying duplicates using a date time variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802329#M33270</link>
      <description>&lt;P&gt;Show us a portion of the data, where you provide the data as SAS data step code which you can type in yourself, or by following &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;. Show us the desired output from this data.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 19:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802329#M33270</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-15T19:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying duplicates using a date time variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802333#M33271</link>
      <description>I'm sorry but my data contains PHIs and I can't share publicly</description>
      <pubDate>Tue, 15 Mar 2022 20:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802333#M33271</guid>
      <dc:creator>Ihsan-Mahdi</dc:creator>
      <dc:date>2022-03-15T20:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying duplicates using a date time variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802342#M33272</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/333045"&gt;@Ihsan-Mahdi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I'm sorry but my data contains PHIs and I can't share publicly&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Anything for an identifier will do, ABC, PDQ, Moose and Squrrel. So make some up with some datetime values that will be similar to your data. The key bits will the datetime variable(s), the structure of the data and the desired output for a given example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The INTCK function will return counts of intervals. Hours between two datetime values would be:&lt;/P&gt;
&lt;P&gt;Hours = Intck('hour',datetime1, datetime2);&lt;/P&gt;
&lt;P&gt;if the datetime2 is before datetime1 you get a negative number of hours.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 20:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-duplicates-using-a-date-time-variable/m-p/802342#M33272</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-15T20:50:54Z</dc:date>
    </item>
  </channel>
</rss>

