<?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 How to select max date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850878#M336254</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;I am looking to create a new column with max date. That mean my new column 'max_date should have&amp;nbsp;&amp;nbsp;27jul2012 for all the caseid?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input caseid $ myDate date9.;&lt;BR /&gt;format myDate date9.;&lt;BR /&gt;datalines;&lt;BR /&gt;34 27jul2010&lt;BR /&gt;35 27jul2011&lt;BR /&gt;37 27jul2012&lt;/P&gt;
&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 00:29:00 GMT</pubDate>
    <dc:creator>bijayadhikar</dc:creator>
    <dc:date>2022-12-23T00:29:00Z</dc:date>
    <item>
      <title>How to select max date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850878#M336254</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;I am looking to create a new column with max date. That mean my new column 'max_date should have&amp;nbsp;&amp;nbsp;27jul2012 for all the caseid?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input caseid $ myDate date9.;&lt;BR /&gt;format myDate date9.;&lt;BR /&gt;datalines;&lt;BR /&gt;34 27jul2010&lt;BR /&gt;35 27jul2011&lt;BR /&gt;37 27jul2012&lt;/P&gt;
&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 00:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850878#M336254</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2022-12-23T00:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to select max date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850880#M336256</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
Create table want as 
Select *, max(myDate) as maxDate format date9.
from have
;Quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 300pt;" border="0" width="300pt" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD width="69" height="19" class="xl65" style="height: 14.6pt; width: 51pt;"&gt;caseid&lt;/TD&gt;
&lt;TD width="69" class="xl65" style="border-left: none; width: 51pt;"&gt;myDate&lt;/TD&gt;
&lt;TD width="69" class="xl65" style="border-left: none; width: 51pt;"&gt;maxDate&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;34&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-10&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;35&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-11&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;37&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 23 Dec 2022 00:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850880#M336256</guid>
      <dc:creator>SK_11</dc:creator>
      <dc:date>2022-12-23T00:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to select max date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850881#M336257</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
Create table want as select *, max(mydate) as max_date format=date. from have;
Quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Dec 2022 00:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850881#M336257</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-23T00:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to select max date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850882#M336258</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 300pt;" border="0" width="300pt" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD width="69" height="19" class="xl65" style="height: 14.6pt; width: 51pt;"&gt;caseid&lt;/TD&gt;
&lt;TD width="69" class="xl65" style="border-left: none; width: 51pt;"&gt;myDate&lt;/TD&gt;
&lt;TD width="69" class="xl65" style="border-left: none; width: 51pt;"&gt;maxDate&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;34&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-10&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;35&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-11&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.6pt;"&gt;
&lt;TD height="19" align="right" class="xl65" style="height: 14.6pt; border-top: none;"&gt;37&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;27-Jul-12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 23 Dec 2022 00:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850882#M336258</guid>
      <dc:creator>SK_11</dc:creator>
      <dc:date>2022-12-23T00:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to select max date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850887#M336261</link>
      <description>Sorry for inconvenience.&lt;BR /&gt;I found a solution. just ignore.&lt;BR /&gt;Bijay</description>
      <pubDate>Fri, 23 Dec 2022 01:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-max-date/m-p/850887#M336261</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2022-12-23T01:02:20Z</dc:date>
    </item>
  </channel>
</rss>

