<?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: Skip days in an inquery in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670915#M201443</link>
    <description>&lt;P&gt;Do you want to skip thirty days, or a month? If it's a month, use the INTNX() function in your WHERE condition.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jul 2020 10:56:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-07-21T10:56:44Z</dc:date>
    <item>
      <title>Skip days in an inquery</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670900#M201438</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to do an inquiry and skip e. g. 30 days always from today. For example, today is 21 July 2020 and I don't want to have the data from 21 June 2020 till 21 July 2020 but all the other data.&amp;nbsp;How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SQL I used trunc and sysdate, e. g. date &amp;lt;= trunc(sysdate-30). Can I use this in SAS as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using SAS Enterprise Guide Version 7.15 HF2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanx in advanced!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caro&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 09:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670900#M201438</guid>
      <dc:creator>Caro17</dc:creator>
      <dc:date>2020-07-21T09:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Skip days in an inquery</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670903#M201439</link>
      <description>&lt;P&gt;What to do depends, as always, on the data you have. If you have a sas-date, you can do something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date &amp;lt;= today()-30&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have a datetime-variable, then&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;datepart(date) &amp;lt;= today()-30&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 09:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670903#M201439</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-07-21T09:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Skip days in an inquery</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670905#M201440</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   do date = '01jan2020'd to '31dec2020'd;
      output;
   end;
   format date ddmmyy10.;
run;

data want;
   set have;
   where date &amp;lt; intnx('day', today(), -30) | date &amp;gt; today();
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jul 2020 09:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670905#M201440</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-07-21T09:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Skip days in an inquery</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670915#M201443</link>
      <description>&lt;P&gt;Do you want to skip thirty days, or a month? If it's a month, use the INTNX() function in your WHERE condition.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 10:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-days-in-an-inquery/m-p/670915#M201443</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-21T10:56:44Z</dc:date>
    </item>
  </channel>
</rss>

