<?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: Getting a the date three months ago in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256187#M57121</link>
    <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the new code with your improvements plus formatting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;threeMonthsAgo = put(intnx('month', today(), -3, 'e'), yymmdd10.);&lt;BR /&gt;call symput('end_date', threeMonthsAgo);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;end_date;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2016 18:19:17 GMT</pubDate>
    <dc:creator>Grant</dc:creator>
    <dc:date>2016-03-11T18:19:17Z</dc:date>
    <item>
      <title>Getting the date three months ago</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256179#M57119</link>
      <description>&lt;P&gt;Hi, this is my first post, and I am wondering how I can use the date three months ago in a sql query. I want to use the date in a WHERE clause. The main problem I have is that today() does not play well with intnx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;threeMonthsAgo = intnx('month', today(), -3, e);&lt;BR /&gt;call symput('end_date', threeMonthsAgo);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select * from mydatabase where the_date &amp;lt; &amp;amp;end_date;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 18:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256179#M57119</guid>
      <dc:creator>Grant</dc:creator>
      <dc:date>2016-03-11T18:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a the date three months ago</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256184#M57120</link>
      <description>You need to check your log the issue is that e needs to be in quotes as a directive to INTNX. Without quotes it is interpreted to be a variable and since there is no variable e it has no value and generates an error.</description>
      <pubDate>Fri, 11 Mar 2016 18:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256184#M57120</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-11T18:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a the date three months ago</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256187#M57121</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the new code with your improvements plus formatting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;threeMonthsAgo = put(intnx('month', today(), -3, 'e'), yymmdd10.);&lt;BR /&gt;call symput('end_date', threeMonthsAgo);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;end_date;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 18:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-the-date-three-months-ago/m-p/256187#M57121</guid>
      <dc:creator>Grant</dc:creator>
      <dc:date>2016-03-11T18:19:17Z</dc:date>
    </item>
  </channel>
</rss>

