<?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 last 30 days by group in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468838#M14668</link>
    <description>Yes. That worked. Thanks.</description>
    <pubDate>Fri, 08 Jun 2018 19:14:35 GMT</pubDate>
    <dc:creator>DWhite</dc:creator>
    <dc:date>2018-06-08T19:14:35Z</dc:date>
    <item>
      <title>Select last 30 days by group</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468833#M14666</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to select the past 30 days of data from the current date/time for multiple groups in SAS DI. This is a streaming data set that has new observations every 10 minutes. Schedule manager updates this SAS table every hour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My time is of the format: 08June2018:14:40:00.000 and named UTCDateTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My group is based on a multiple categorical values in the "name" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added a "group_by" on "name" and setup a "having" statement using the TODAY function thinking that it would report the past 30 days, but it only reports all of the timestamps for the past 30th day (which make sense now!).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATEPART(UTCDateTime) = TODAY()-30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 19:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468833#M14666</guid>
      <dc:creator>DWhite</dc:creator>
      <dc:date>2018-06-08T19:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select last 30 days by group</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468837#M14667</link>
      <description>&lt;P&gt;Can we assume that UTCDateTime never contains values that go into the future?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to change &lt;FONT color="#FF0000"&gt;= TODAY()-30&lt;/FONT&gt; to &lt;FONT color="#008000"&gt;&amp;gt;= TODAY()-30&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 19:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468837#M14667</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-08T19:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select last 30 days by group</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468838#M14668</link>
      <description>Yes. That worked. Thanks.</description>
      <pubDate>Fri, 08 Jun 2018 19:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Select-last-30-days-by-group/m-p/468838#M14668</guid>
      <dc:creator>DWhite</dc:creator>
      <dc:date>2018-06-08T19:14:35Z</dc:date>
    </item>
  </channel>
</rss>

