<?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: transaction occurred with 10 minutes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668851#M200540</link>
    <description>&lt;P&gt;I am sorry unfortunately i cannot share the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have different credit card transactions at particular merchant. I would like to check from first transaction with in 10 minutes of time how many transaction happen irrespective of first transaction time.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2020 14:49:46 GMT</pubDate>
    <dc:creator>rameshmodi04</dc:creator>
    <dc:date>2020-07-13T14:49:46Z</dc:date>
    <item>
      <title>transaction occurred with 10 minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668846#M200537</link>
      <description>&lt;P&gt;I would like to know the logic for extracting transactions occurred with in 10 min , i have date, time with seconds, credit card and amount variables.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 14:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668846#M200537</guid>
      <dc:creator>rameshmodi04</dc:creator>
      <dc:date>2020-07-13T14:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: transaction occurred with 10 minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668847#M200538</link>
      <description>&lt;P&gt;Show us a portion of the data. Follow these instructions:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, describe the logic you want to use in more detail. Within 10 minutes of what?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 14:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668847#M200538</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-13T14:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: transaction occurred with 10 minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668851#M200540</link>
      <description>&lt;P&gt;I am sorry unfortunately i cannot share the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have different credit card transactions at particular merchant. I would like to check from first transaction with in 10 minutes of time how many transaction happen irrespective of first transaction time.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 14:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668851#M200540</guid>
      <dc:creator>rameshmodi04</dc:creator>
      <dc:date>2020-07-13T14:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: transaction occurred with 10 minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668855#M200544</link>
      <description>&lt;P&gt;Make up some data, in the exact same format as the real data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I have different credit card transactions at particular merchant. I would like to check from first transaction with in 10 minutes of time how many transaction happen irrespective of first transaction time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;This still is vague in my mind, and can be interpreted differently by different people. Provide a few representative examples (plural) in your fake data set and explain the desired output.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 15:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668855#M200544</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-13T15:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: transaction occurred with 10 minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668862#M200548</link>
      <description>&lt;P&gt;The following data steps first create some datetime values for a few IDs at random intervals in minutes.&lt;/P&gt;
&lt;P&gt;The second then shows how to determine the interval of a given datetime value from the first one.&lt;/P&gt;
&lt;P&gt;You would use your account information in place of ID and likely requires sorting by the account information and the datetime of the transaction.&lt;/P&gt;
&lt;P&gt;If you do not have a datetime value, which you will need, then the code will show how to add time values in hour minute seconds, if separate values, to a date.&lt;/P&gt;
&lt;PRE&gt;data example;
  do id = 1, 2, 3;
   do date='11Jul2020'd, '12Jul2020'd;
      hour = rand('integer',1,15);
      min  = rand('integer',1,18);
      sec  = rand('integer',1,53);
      datetime= dhms(date, hour,min,sec);
      output;
      do i= 1 to 10;
         rmin= rand('integer',1,15);
         datetime = intnx('minute',datetime,rmin);
         output;
      end;
   end;
  end;
  format datetime datetime18.;
  keep id datetime;
run;

data want;
   set example;
   by id;
   retain firsttime;
   if first.id then firsttime=datetime;
   interval = intck('minute',firsttime,datetime,'C');
   format firststime datetime18.;
   label interval="# minutes from first record for id";
run;&lt;/PRE&gt;
&lt;P&gt;Set a flag for the interval value of interest to count as needed.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 15:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transaction-occurred-with-10-minutes/m-p/668862#M200548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-13T15:12:27Z</dc:date>
    </item>
  </channel>
</rss>

