<?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: move specific records on the top by date. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174010#M33420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In line with Reeza and Art, a SQL solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;datalines&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d :&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;time5.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;time5.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,01:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,02:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,21:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,22:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,23:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,0:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,1:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,2:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,3:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want (drop=_group) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;case&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;'21:00't&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;else&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _group&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;order&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d, calculated _group, t&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2014 16:41:14 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-04-09T16:41:14Z</dc:date>
    <item>
      <title>move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174007#M33417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;Hi, I would like to move the records to the top row if t &amp;gt;= 21:00 ( previous day)&amp;nbsp; and t &amp;lt;0:00 (before next day). Thank you so much !&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;data have;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;infile datalines delimiter=','; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; input d $ t $;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; datalines;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,00:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,01:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,02:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,21:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,22:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,23:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,0:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,1:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,2:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,3:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; ;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; run;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; data want;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;infile datalines delimiter=','; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; input d $ t $;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; datalines;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,21:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,22:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,23:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,00:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,01:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/1/2014,02:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,0:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,1:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,2:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;1/2/2014,3:00&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; ;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 15:39:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174007#M33417</guid>
      <dc:creator>davidnamh</dc:creator>
      <dc:date>2014-04-09T15:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174008#M33418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a new variable, and sort by that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;if t&amp;gt;75600 then sort_date=intnx('day', d, -1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=have out=want;&lt;/P&gt;&lt;P&gt;by date sort_date time;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 15:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174008#M33418</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-04-09T15:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174009#M33419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically the same suggestion as Fareeza, but to do either you have to create date and time fields.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile datalines delimiter=',';&lt;/P&gt;&lt;P&gt;input d $ t $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1/1/2014,00:00&lt;/P&gt;&lt;P&gt;1/1/2014,01:00&lt;/P&gt;&lt;P&gt;1/1/2014,02:00&lt;/P&gt;&lt;P&gt;1/1/2014,21:00&lt;/P&gt;&lt;P&gt;1/1/2014,22:00&lt;/P&gt;&lt;P&gt;1/1/2014,23:00&lt;/P&gt;&lt;P&gt;1/2/2014,0:00&lt;/P&gt;&lt;P&gt;1/2/2014,1:00&lt;/P&gt;&lt;P&gt;1/2/2014,2:00&lt;/P&gt;&lt;P&gt;1/2/2014,3:00&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; date=input(d,mmddyy10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; time=input(t,time5.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; timegroup=ifn(time ge 75600,1,2);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by date timegroup time;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 15:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174009#M33419</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-04-09T15:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174010#M33420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In line with Reeza and Art, a SQL solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;datalines&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d :&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;time5.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;time5.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,01:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,02:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,21:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,22:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/2014,23:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,0:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,1:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,2:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/2/2014,3:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want (drop=_group) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;case&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; t&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;'21:00't&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;else&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _group&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;order&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; d, calculated _group, t&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 16:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174010#M33420</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-04-09T16:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174011#M33421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help !&amp;nbsp; I really appreciate it so much. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 16:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174011#M33421</guid>
      <dc:creator>davidnamh</dc:creator>
      <dc:date>2014-04-09T16:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: move specific records on the top by date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174012#M33422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone for the codes ! &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Every codes in the thread works good. They all returned the output as I wanted to see.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 16:59:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/move-specific-records-on-the-top-by-date/m-p/174012#M33422</guid>
      <dc:creator>davidnamh</dc:creator>
      <dc:date>2014-04-09T16:59:04Z</dc:date>
    </item>
  </channel>
</rss>

