<?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 create consecutive intervals in months between 2 dates for all ids in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354596#M10620</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I really need your advice asap&amp;nbsp;to create intervals of&amp;nbsp;3 months between 2 dates for all ids&amp;nbsp;: begin_date and final_date. For the example provided (see file attached), the 2 dates are within&amp;nbsp;3 months of each other, but I could have the final_date in the analysis anywhere from 1 to 12 or more months apart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example provided is for id=604. It has&amp;nbsp; begin_date, final_date, event_number, event_date.&amp;nbsp;All the dates&amp;nbsp;had a format of yymmdd10. I first converted the&amp;nbsp; 'begin_date' into a sas date callled 'begin_date2'&amp;nbsp;to&amp;nbsp;use the intnx function. Below is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created 2 start and end dates ..int1start, int1end, int2start, int2end and 2 intervals p_int1 and&amp;nbsp;p_int2 . I gave&amp;nbsp;the interval&amp;nbsp;a value of '1' or '0'&amp;nbsp;: '1'&amp;nbsp;if the final_date was&amp;nbsp;between the start and end dates for the interval and '0' if the final_date was absent between the start and end dates for the interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know if there is faster way to do this. How can I ask for the final_date to determine the 'last end date' for the 'last interval? Basically, how can stop creatung the interval dates? The final_date has to be within the last interval period. Also, can I create these interval start and end dates using macro and also the intervals p_int1 etc.? Please let me know and do look at the attachment for the end result of the code below.&amp;nbsp; I would like to know about a shorter way to accomplish the same.Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS CODE:&lt;/P&gt;
&lt;P&gt;begin_date2=begin_date; /* converted into a sas date*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int1start=begin_date2 ;&lt;/P&gt;
&lt;P&gt;int1end=intnx('month',begin_date2,&lt;STRONG&gt;3&lt;/STRONG&gt;,'same')-&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int2start=intnx('month',int1end,&lt;STRONG&gt;0&lt;/STRONG&gt;,'same')+&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;int2end=intnx('month',int2start,&lt;STRONG&gt;3&lt;/STRONG&gt;,'same')-&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format int1start int1end int2start int2end yymmdd10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if int1start le final_date_new lt int1end then p_Int1=&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;else if int2start le final_date_new lt int2end then p_Int2=&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format int1start int1end int2start int2end yymmdd10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also wanted to add that these intervals have to be determined for many others ids in the dataset.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2017 20:15:09 GMT</pubDate>
    <dc:creator>dr2014</dc:creator>
    <dc:date>2017-04-28T20:15:09Z</dc:date>
    <item>
      <title>create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354596#M10620</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I really need your advice asap&amp;nbsp;to create intervals of&amp;nbsp;3 months between 2 dates for all ids&amp;nbsp;: begin_date and final_date. For the example provided (see file attached), the 2 dates are within&amp;nbsp;3 months of each other, but I could have the final_date in the analysis anywhere from 1 to 12 or more months apart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example provided is for id=604. It has&amp;nbsp; begin_date, final_date, event_number, event_date.&amp;nbsp;All the dates&amp;nbsp;had a format of yymmdd10. I first converted the&amp;nbsp; 'begin_date' into a sas date callled 'begin_date2'&amp;nbsp;to&amp;nbsp;use the intnx function. Below is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created 2 start and end dates ..int1start, int1end, int2start, int2end and 2 intervals p_int1 and&amp;nbsp;p_int2 . I gave&amp;nbsp;the interval&amp;nbsp;a value of '1' or '0'&amp;nbsp;: '1'&amp;nbsp;if the final_date was&amp;nbsp;between the start and end dates for the interval and '0' if the final_date was absent between the start and end dates for the interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know if there is faster way to do this. How can I ask for the final_date to determine the 'last end date' for the 'last interval? Basically, how can stop creatung the interval dates? The final_date has to be within the last interval period. Also, can I create these interval start and end dates using macro and also the intervals p_int1 etc.? Please let me know and do look at the attachment for the end result of the code below.&amp;nbsp; I would like to know about a shorter way to accomplish the same.Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS CODE:&lt;/P&gt;
&lt;P&gt;begin_date2=begin_date; /* converted into a sas date*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int1start=begin_date2 ;&lt;/P&gt;
&lt;P&gt;int1end=intnx('month',begin_date2,&lt;STRONG&gt;3&lt;/STRONG&gt;,'same')-&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int2start=intnx('month',int1end,&lt;STRONG&gt;0&lt;/STRONG&gt;,'same')+&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;int2end=intnx('month',int2start,&lt;STRONG&gt;3&lt;/STRONG&gt;,'same')-&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format int1start int1end int2start int2end yymmdd10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if int1start le final_date_new lt int1end then p_Int1=&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;else if int2start le final_date_new lt int2end then p_Int2=&lt;STRONG&gt;1&lt;/STRONG&gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format int1start int1end int2start int2end yymmdd10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also wanted to add that these intervals have to be determined for many others ids in the dataset.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 20:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354596#M10620</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-04-28T20:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354601#M10621</link>
      <description>&lt;P&gt;Can you post a small subset of input and expected output, directly in the forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many users will not download Excel files.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 20:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354601#M10621</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-28T20:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354615#M10623</link>
      <description>&lt;P&gt;Hi Reeza, I replied to your message ad even copy pasted the table and for some reason it didnt get posted. Hopefully this one gets out in time. Here is the final output with the original variables. The reason I have to calculate the inetrvals is to calcuate the average values of the event_value (which I have listed in the table below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="1084"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;id&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;begin_date&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;final_date&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;event_date&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;event_number&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;event_value&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;begin_date2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;int1start&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;int1end&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;int2start&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;int2end&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;p_Int1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;
&lt;P&gt;p_Int2&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-16&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;44&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;44&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-25&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-25&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;15&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-25&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;93&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-25&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;44&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="60"&gt;
&lt;P&gt;604&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="92"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="82"&gt;
&lt;P&gt;2010-08-23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-06-25&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="87"&gt;
&lt;P&gt;73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75"&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;18424&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84"&gt;
&lt;P&gt;2010-06-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="72"&gt;
&lt;P&gt;2010-09-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="90"&gt;
&lt;P&gt;2010-09-11&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="78"&gt;
&lt;P&gt;2010-12-10&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="48"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="160"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 28 Apr 2017 21:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354615#M10623</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-04-28T21:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354617#M10624</link>
      <description>&lt;P&gt;Actually, I have an additon to my original question. I have to calculate the average values&amp;nbsp;of the&amp;nbsp;'event_value' by 'event_number'&amp;nbsp;in the dataset for&amp;nbsp;all interval periods until the interval period that contains the final_date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what would be the best way to go about determining the interval periods and calculating the aaverage 'event_value' by 'event_number' for each interval.? I hope I am making sense here. Any help would be appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 21:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354617#M10624</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-04-28T21:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354622#M10625</link>
      <description>&lt;P&gt;Just to clarify, your intervals are unique for every record, so it's not like grouping data into specific quarters for analysis?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 22:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354622#M10625</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-28T22:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354629#M10626</link>
      <description>&lt;P&gt;For some reason Reeza&amp;nbsp;I am not receiving emails to notify me when there is reply. Also, I actually made an error in&amp;nbsp;my code. The interval period is for 4 months. But yes, the interval of 4 months is the same for all ids. I hope I an understanding your question correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i.e for ids,&amp;nbsp;4-month intervals are determined between the begin_date and final_date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 22:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354629#M10626</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-04-28T22:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354630#M10627</link>
      <description>&lt;P&gt;I think I got what you are enquiring the final_date differs for all ids so the number of 4-month intervals are different for each id.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 22:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354630#M10627</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-04-28T22:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354658#M10628</link>
      <description>&lt;P&gt;I'm kind of groping for what you want, but does this piece of code advance your progress? It calculates the number of complete four-month intervals between begin_date and final_date, which is what you're doing in your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; begin_date final_date &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; begin_date final_date &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; begin_date final_date &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; begin_date final_date;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cards&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;11Jun2010 09Oct2010&lt;/P&gt;
&lt;P&gt;11Jun2010 10Oct2010&lt;/P&gt;
&lt;P&gt;11Jun2010 11Oct2010&lt;/P&gt;
&lt;P&gt;11Jun2010 12Oct2010&lt;/P&gt;
&lt;P&gt;11Jun2010 13Oct2010&lt;/P&gt;
&lt;P&gt;11Jun2010 09Feb2011&lt;/P&gt;
&lt;P&gt;11Jun2010 10Feb2011&lt;/P&gt;
&lt;P&gt;11Jun2010 11Feb2011&lt;/P&gt;
&lt;P&gt;11Jun2010 12Feb2011&lt;/P&gt;
&lt;P&gt;11Jun2010 13Feb2011&lt;/P&gt;
&lt;P&gt;11Jun2010 09Jun2011&lt;/P&gt;
&lt;P&gt;11Jun2010 10Jun2011&lt;/P&gt;
&lt;P&gt;11Jun2010 11Jun2011&lt;/P&gt;
&lt;P&gt;11Jun2010 12Jun2011&lt;/P&gt;
&lt;P&gt;11Jun2010 13Jun2011&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; want;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt; Intervals = intck(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'month4'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, begin_date, final_date, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'continuous'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 01:48:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/354658#M10628</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-04-29T01:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358208#M10755</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15142"&gt;@TomKari&lt;/a&gt;. That was helpful to know the number of intervals. However, I got the solution I was looking for on the same post in the SAS data management group. I explained the concern clearly in that post.</description>
      <pubDate>Fri, 12 May 2017 11:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358208#M10755</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-12T11:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: create consecutive intervals in months between 2 dates for all ids</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358232#M10756</link>
      <description>&lt;P&gt;I'm glad you found the solution, &lt;SPAN class="login-bold"&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44608" target="_self"&gt;dr2014&lt;/A&gt;! I&lt;/SPAN&gt;&amp;nbsp;think this is the post with the solution you were referring to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358206#M84152" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358206#M84152&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Anna&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 13:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/create-consecutive-intervals-in-months-between-2-dates-for-all/m-p/358232#M10756</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2017-05-12T13:39:49Z</dc:date>
    </item>
  </channel>
</rss>

