<?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 data from last 30 days in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643848#M35917</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
where date ge today() - 30;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Apr 2020 10:06:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-04-29T10:06:49Z</dc:date>
    <item>
      <title>Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643847#M35916</link>
      <description>&lt;P&gt;Hello lads,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following data (just a small example):&lt;BR /&gt;&lt;STRONG&gt;Location -- Section -- Date -- Counts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Germany -- SA&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 29/04/2020 -- 20&lt;/P&gt;
&lt;P&gt;Germany -- SA&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 28/04/2020 -- 67&lt;/P&gt;
&lt;P&gt;Germany -- SA&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 27/04/2020 -- 34&lt;/P&gt;
&lt;P&gt;Germany -- SA&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 26/04/2020 -- 56&lt;/P&gt;
&lt;P&gt;Germany -- SB&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 29/04/2020 -- 76&lt;/P&gt;
&lt;P&gt;Germany -- SB&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 28/04/2020 -- 43&lt;/P&gt;
&lt;P&gt;Germany -- SB&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 27/04/2020 -- 44&lt;/P&gt;
&lt;P&gt;Germany -- SB&amp;nbsp; &amp;nbsp; &amp;nbsp; -- 26/04/2020 -- 90&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dataset contains data of more that 1 year back, it gets updated every day. I want to select just the counts of the last 30 days (per location and section!). Hope someone can help me out with this..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 10:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643847#M35916</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643848#M35917</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
where date ge today() - 30;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Apr 2020 10:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643848#M35917</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-29T10:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643849#M35918</link>
      <description>Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 29 Apr 2020 10:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643849#M35918</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T10:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643850#M35919</link>
      <description>I assume ge stands for Greater then or Equal?</description>
      <pubDate>Wed, 29 Apr 2020 10:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643850#M35919</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T10:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643855#M35920</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310659"&gt;@AK100&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I assume ge stands for Greater then or Equal?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Correct. The mnemonic for "greater" is gt. I like to use the mnemonics to avoid confusion when a certain character is not readily available on a keyboard, or might be changed somewhere along the way by some software converting it to a Unicode character.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 10:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643855#M35920</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-29T10:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643867#M35921</link>
      <description>That makes sense &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 29 Apr 2020 11:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643867#M35921</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643907#M35922</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also tried to do the same for the past 3 months(not 90 days). I figured out the following code (with the help of one of your codes in some other topic):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set want;&lt;BR /&gt;where intnx('month',today(),-3,'same') &amp;lt;= datum &amp;lt;=today();&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wondered if there was an easier code to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 12:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643907#M35922</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T12:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643915#M35923</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310659"&gt;@AK100&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also tried to do the same for the past 3 months(not 90 days). I figured out the following code (with the help of one of your codes in some other topic):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set want;&lt;BR /&gt;where intnx('month',today(),-3,'same') &amp;lt;= datum &amp;lt;=today();&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wondered if there was an easier code to do this?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Using the INTNX function for this is the proper way, as it takes care of different month lengths. I see nothing wrong here.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 13:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643915#M35923</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-29T13:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643929#M35924</link>
      <description>Oke, it works but sometimes when i change -3 in -10 for example (to give me pas 10 months) it still gives me only the past 3. Weird...</description>
      <pubDate>Wed, 29 Apr 2020 13:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643929#M35924</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T13:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643950#M35925</link>
      <description>&lt;P&gt;Please post your data in usable form (data step with datalines), and the code you ran against it. I will test it and see what went wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 13:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643950#M35925</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-29T13:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select data from last 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643982#M35928</link>
      <description>I'm figuring out how to fix that datastep, hope to have it soon &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 29 Apr 2020 14:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Select-data-from-last-30-days/m-p/643982#M35928</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-04-29T14:49:29Z</dc:date>
    </item>
  </channel>
</rss>

