<?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: How to subract the last date from the first date for each row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721344#M223568</link>
    <description>&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More people should grasp the power of PROC SUMMARY. Hardly a day goes by when I don't use it (except weekends and holidays)&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 17:29:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-02-23T17:29:15Z</dc:date>
    <item>
      <title>How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721303#M223554</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I have a dataset similar to the one shown below, where I have transposed the data in chrongical order based on date. My&amp;nbsp;dates will be different every time though.. since I will be running a query everyday so the dates will update. For each ID, I need to subtract the latest date( amount)- First date (amount)/ First date to find the percentage of change over that time period. SO for ID1 ( 138-0)/0 but I will need to set this to 100% for ID2 (149-145)/145.&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ID sasdate &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; amount; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sasdate &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 01FEB2014 123&lt;/P&gt;&lt;P&gt;1 01MAR2014 138&lt;/P&gt;&lt;P&gt;2 01JAN2014 145&lt;/P&gt;&lt;P&gt;2 01FEB2014 155&lt;/P&gt;&lt;P&gt;2 01MAR2014 149&lt;/P&gt;&lt;P&gt;3 01JAN2014 133&lt;/P&gt;&lt;P&gt;3 01FEB2014 132&lt;/P&gt;&lt;P&gt;3 01MAR2014 129&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=test; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id sasdate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;select&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;distinct&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cats(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,put(sasdate,&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;into&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; :alldates separated by &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;' '&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;order&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sasdate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;alldates; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;transpose&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=test &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outx1 (&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=_name_); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; amount; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;id&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sasdate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;idlabel&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sasdate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; outx1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id &amp;amp;alldates; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; outx1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;print&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outx1 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;label&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;noobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;title&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#800080"&gt;'Transposed dates in chronological order'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 15:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721303#M223554</guid>
      <dc:creator>Melika2</dc:creator>
      <dc:date>2021-02-23T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721314#M223559</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;... SO for ID1 ( 138-0)/0 ...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand this part. Shouldn't it be (138-123)/123 for ID1?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 16:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721314#M223559</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-23T16:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721323#M223561</link>
      <description>&lt;P&gt;it should be the earliest date which is 01JAN2014 and since there was no amount for that.. it should be set to 0. The earliest date associated for the whole dataset not the particular group.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 16:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721323#M223561</guid>
      <dc:creator>Melika2</dc:creator>
      <dc:date>2021-02-23T16:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721328#M223562</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=test;
    class id;
    var sasdate amount;
    output out=summary maxid(sasdate(amount))=max_date_amount minid(sasdate(amount))=min_date_amount 
        max(sasdate)=max_date min(sasdate)=min_date;
run;
data want;
    if _n_=1 then set summary(where=(_type_=0) rename=(min_date=global_min_date) keep=min_date _type_);
    set summary(where=(_type_=1));
    if min_date=global_min_date then percent=(max_date_amount-min_date_amount)/min_date_amount;
    else percent=1;
    format percent percentn8.2;
    drop _type_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Feb 2021 16:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721328#M223562</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-23T16:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721339#M223567</link>
      <description>Very nice.  No pre-sorting required, and getting the global min date is integrated in use of the proc summary.</description>
      <pubDate>Tue, 23 Feb 2021 17:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721339#M223567</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-02-23T17:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721344#M223568</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More people should grasp the power of PROC SUMMARY. Hardly a day goes by when I don't use it (except weekends and holidays)&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 17:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721344#M223568</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-23T17:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721371#M223578</link>
      <description>This works! Thank you so much... what if I want to group by two class variables?</description>
      <pubDate>Tue, 23 Feb 2021 19:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721371#M223578</guid>
      <dc:creator>Melika2</dc:creator>
      <dc:date>2021-02-23T19:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721378#M223581</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242790"&gt;@Melika2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;This works! Thank you so much... what if I want to group by two class variables?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Say you use &lt;EM&gt;&lt;STRONG&gt;CLASS A B:&lt;/STRONG&gt;&lt;/EM&gt; .&amp;nbsp; Then proc summary would generate 4 types of observations (indicated by the _TYPE_ variable):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Each non-empty A*B cell.&amp;nbsp; &amp;nbsp;_TYPE_=3&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Each Class A value (summed over all B values)&amp;nbsp; - think row marginals - there will be N(a) of these, with _TYPE=1 or 2, I forget which.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Each Class B value (summed over all A values)&amp;nbsp; - think column marginals - there will be N(b) of these with&amp;nbsp; _TYPE_=2 or 1&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Global&amp;nbsp; (one cell)&amp;nbsp; &amp;nbsp;_TYPE_=0&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The specific PROC SUMMARY feature used for this problem by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;was the MINID option, as in&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;minid(sasdate(amount))=min_date_amount &lt;/LI-CODE&gt;
&lt;P&gt;which records the amount corresponding to the minimum sasdate&amp;nbsp; (within each CLASSification).&amp;nbsp; I had been unaware of MINID (or maybe I forgot - I can't remember) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So not only did proc summary provide the minimum date via&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;min(sasdate)=min_date&lt;/LI-CODE&gt;
&lt;P&gt;allowing you to trivially determine whether a given ID has a starting date equivalent to the overall starting date, but you have the corresponding amount available when needed.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 19:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721378#M223581</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-02-23T19:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721390#M223586</link>
      <description>&lt;P&gt;To do this for 2 ID variables, I think only two changes are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=test;
    class id1 id2;
    var sasdate amount;
    output out=summary maxid(sasdate(amount))=max_date_amount minid(sasdate(amount))=min_date_amount 
        max(sasdate)=max_date min(sasdate)=min_date;
run;
data want;
    if _n_=1 then set summary(where=(_type_=0) rename=(min_date=global_min_date) keep=min_date _type_);
    set summary(where=(_type_=3));
    if min_date=global_min_date then percent=(max_date_amount-min_date_amount)/min_date_amount;
    else percent=1;
    format percent percentn8.2;
    drop _type_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think if you have a large data set, you can make PROC SUMMARY more efficient by adding in the WAYS statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ways 0 2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 20:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721390#M223586</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-23T20:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721392#M223587</link>
      <description>&lt;P&gt;I think that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;&amp;nbsp;have forgotten more about PROC SUMMARY than I ever knew (or probably ever will know).&amp;nbsp; Talk about achieving the goal with the fewest PROCs / passes through the data!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 20:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721392#M223587</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-02-23T20:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to subract the last date from the first date for each row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721469#M223626</link>
      <description>&lt;P&gt;This is an example of why I try to convince programming colleagues to think of SAS as a tool first, a programming language second (and really it's the DATA step that I find is most like a language).&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 04:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subract-the-last-date-from-the-first-date-for-each-row/m-p/721469#M223626</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-02-24T04:38:21Z</dc:date>
    </item>
  </channel>
</rss>

