<?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 Extracting/Selecting observations of the last 20 mins of a SAS data set in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198506#M49622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope anyone can help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set, which is continuously updated. For each observation, I have the time and date when the observations entered the data set. Currently I am calculating a number of metrics (means etc.) for the whole data set using a proc tabulate, which is working fine. However, I would like to perform my analysis not on the entire data set but only on the observations of the last 20 or 30 minutes from the moment, I request my metrics (System Time). Is there a way to include this restriction into a WHERE statement in the proc tabulate or is there a simple way to extract this time interval (last 20 min.) and create a new data set and then run the analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you guys.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2015 23:42:07 GMT</pubDate>
    <dc:creator>plnc</dc:creator>
    <dc:date>2015-03-10T23:42:07Z</dc:date>
    <item>
      <title>Extracting/Selecting observations of the last 20 mins of a SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198506#M49622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope anyone can help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set, which is continuously updated. For each observation, I have the time and date when the observations entered the data set. Currently I am calculating a number of metrics (means etc.) for the whole data set using a proc tabulate, which is working fine. However, I would like to perform my analysis not on the entire data set but only on the observations of the last 20 or 30 minutes from the moment, I request my metrics (System Time). Is there a way to include this restriction into a WHERE statement in the proc tabulate or is there a simple way to extract this time interval (last 20 min.) and create a new data set and then run the analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you guys.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 23:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198506#M49622</guid>
      <dc:creator>plnc</dc:creator>
      <dc:date>2015-03-10T23:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting/Selecting observations of the last 20 mins of a SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198507#M49623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possibility is to put WHERE condition as a data set option, somewhere like:&lt;/P&gt;&lt;P&gt;PROC TABULATE data=foo (WHERE=);&lt;/P&gt;&lt;P&gt;CLASS ...;&lt;/P&gt;&lt;P&gt;VAR ...;&lt;/P&gt;&lt;P&gt;TABLE ...;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 13:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198507#M49623</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-03-11T13:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting/Selecting observations of the last 20 mins of a SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198508#M49624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort to a new dataset by descending time, then retain the time from _n_ = 1, and use a subsetting if with reference_time - 20*60 (as SAS time is stored in seconds)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 13:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extracting-Selecting-observations-of-the-last-20-mins-of-a-SAS/m-p/198508#M49624</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-11T13:22:03Z</dc:date>
    </item>
  </channel>
</rss>

