<?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: select the date that is immediately 30 days after the first date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529898#M144859</link>
    <description>&lt;P&gt;why is the 2nd record zero&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;002 05/1/2014 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; &amp;nbsp;002 10/1/2014&amp;nbsp; 0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10/1/2014 and 05/1/2014 are 153 days apart and that's greater than 30 plus the immediate record after 30 days?&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 22:32:47 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-01-24T22:32:47Z</dc:date>
    <item>
      <title>select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529891#M144856</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need help with the claims data that i am working with.&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; input person_sk service_dt:mmddyy.;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cards;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 04/01/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 01/01/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 01/15/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 03/01/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 03/03/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 04/15/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;002 05/1/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;002 10/1/2014&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to identify the service_dt that is immediately 30 days after the first service_dt. This will be my first trigger date. Then i need to count the number of days from first trigger date and identify the second trigger date that comes immediately 30 days after the first trigger date.&lt;/P&gt;&lt;P&gt;I need the data set to be like&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;person_sk service_dt trigger_date&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 01/01/2014&amp;nbsp; 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 01/15/2014&amp;nbsp; 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 03/01/2014&amp;nbsp; 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 03/03/2014&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 04/02/2014&amp;nbsp; 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;001 04/15/2014&amp;nbsp; 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;002 05/1/2014 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;002 10/1/2014&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529891#M144856</guid>
      <dc:creator>skavyasindhu</dc:creator>
      <dc:date>2019-01-24T22:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529895#M144858</link>
      <description>&lt;P&gt;this link should have the solution you are asking for.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/selecting-data-in-the-first-30-days-since-first-date/m-p/256824#M49254" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/selecting-data-in-the-first-30-days-since-first-date/m-p/256824#M49254&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529895#M144858</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-01-24T22:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529898#M144859</link>
      <description>&lt;P&gt;why is the 2nd record zero&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;002 05/1/2014 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; &amp;nbsp;002 10/1/2014&amp;nbsp; 0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10/1/2014 and 05/1/2014 are 153 days apart and that's greater than 30 plus the immediate record after 30 days?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529898#M144859</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-24T22:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529900#M144861</link>
      <description>&lt;P&gt;You are right. Sorry about that. I just edited.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529900#M144861</guid>
      <dc:creator>skavyasindhu</dc:creator>
      <dc:date>2019-01-24T22:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529902#M144863</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

      input person_sk service_dt:mmddyy10.;
	  format service_dt mmddyy10.;
      cards;
     001 04/01/2014 
     001 01/01/2014 
     001 01/15/2014 
     001 03/01/2014 
     001 03/03/2014 
     001 04/15/2014 
     002 05/1/2014 
     002 10/1/2014 
     ;
run;

proc sort data= have out=_have ;
by person_sk service_dt;
run;

data want;
set _have;
by person_sk;
retain t;
if first.person_sk then do; t=service_dt;flag=1;end;
else do;flag= intck('days',t,service_dt)&amp;gt;30;
if flag then t=service_dt;
end;
drop t;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/529902#M144863</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-24T22:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: select the date that is immediately 30 days after the first date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/530088#M144934</link>
      <description>&lt;P&gt;This worked!! Thank you so much, i really appreciate your help.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 15:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-date-that-is-immediately-30-days-after-the-first-date/m-p/530088#M144934</guid>
      <dc:creator>skavyasindhu</dc:creator>
      <dc:date>2019-01-25T15:30:08Z</dc:date>
    </item>
  </channel>
</rss>

