<?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: Find Minimum Date of Data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352807#M23285</link>
    <description>&lt;P&gt;Lol I will do mate, I just realised after, as this is the first time I have posted on here. i feel like a right old plonker&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2017 12:21:55 GMT</pubDate>
    <dc:creator>zdassu</dc:creator>
    <dc:date>2017-04-24T12:21:55Z</dc:date>
    <item>
      <title>Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352789#M23279</link>
      <description>&lt;P&gt;Hi can some one help me I want to bring back the minimum dates for each Ref, please see the table below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS Enterprise Guide 7.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Table_Refs&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/01/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;02/02/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;01/02/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;02/03/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;03/04/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;04/05/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10/04/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;11/09/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;04/02/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;01/02/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;01/01/2017&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 11:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352789#M23279</guid>
      <dc:creator>zdassu</dc:creator>
      <dc:date>2017-04-24T11:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352790#M23280</link>
      <description>&lt;P&gt;Please try the proc sort and first. approach to get the minimum date for each ref&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards missover;
input Ref	Date:mmddyy10.;
format date date9.;
cards;
1	01/01/2017
1	02/02/2017
2	01/02/2016
2	02/03/2016
2	03/04/2016
2	04/05/2016
3	10/04/2015
3	11/09/2015
4	04/02/2014
4	01/02/2016
4	01/01/2017
;
run;

proc sort data=have;
by ref date;
run;

data want;
set have;
by ref date;
if first.ref;
run;


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 11:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352790#M23280</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-04-24T11:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352792#M23281</link>
      <description>&lt;P&gt;Alternative, which may be copied and pasted to be used in several systems (e.g. R, SPSS, etc.):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
infile cards missover;
input Ref	Date:mmddyy10.;
format date date9.;
cards;
1	01/01/2017
1	02/02/2017
2	01/02/2016
2	02/03/2016
2	03/04/2016
2	04/05/2016
3	10/04/2015
3	11/09/2015
4	04/02/2014
4	01/02/2016
4	01/01/2017
;
run;

PROC SQL;
SELECT REF, MIN(DATE) FORMAT=MMDDYY10. FROM HAVE GROUP BY REF;
QUIT;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 11:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352792#M23281</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-24T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352795#M23282</link>
      <description>&lt;P&gt;Thank you all&amp;nbsp;for all your help&amp;nbsp;I have used &lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138866" target="_self"&gt;&lt;SPAN&gt;thomp7050&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;solution and it has worked perfectly&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 11:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352795#M23282</guid>
      <dc:creator>zdassu</dc:creator>
      <dc:date>2017-04-24T11:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352799#M23283</link>
      <description>&lt;P&gt;LOL! &amp;nbsp;In the future I recommend you mark the actual solution as the solution, and not your own post.&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352799#M23283</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-24T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352805#M23284</link>
      <description>&lt;P&gt;Still another method, using the MEANS procedure:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have noprint nway;
class ref;
var date;
output out=want (drop=_type_ _freq_) min(date)=date;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With large datasets, sorting and using "by" instead of "class" might become necessary if you run out of memory. As long as the cardinality of ref does not exceed memory limitations, class works without prior sorting.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352805#M23284</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-24T12:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352807#M23285</link>
      <description>&lt;P&gt;Lol I will do mate, I just realised after, as this is the first time I have posted on here. i feel like a right old plonker&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/352807#M23285</guid>
      <dc:creator>zdassu</dc:creator>
      <dc:date>2017-04-24T12:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find Minimum Date of Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/353849#M23330</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59173"&gt;@zdassu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I marked the actual solution as correct for you. I understand an errant slip of the finger!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Shelley&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 19:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Find-Minimum-Date-of-Data/m-p/353849#M23330</guid>
      <dc:creator>ShelleySessoms</dc:creator>
      <dc:date>2017-04-26T19:19:17Z</dc:date>
    </item>
  </channel>
</rss>

