<?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: 6 months back in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930536#M366113</link>
    <description>&lt;P&gt;Thank you !!&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jun 2024 17:20:31 GMT</pubDate>
    <dc:creator>Tal</dc:creator>
    <dc:date>2024-06-01T17:20:31Z</dc:date>
    <item>
      <title>6 months back</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930529#M366108</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let YTD_START = %sysfunc(intnx(year.11, &amp;amp;LASTFRI, 0),yymmdd10.);&lt;/P&gt;
&lt;P&gt;this above gives me&amp;nbsp;YTD_START='2023-11-01'&amp;nbsp; beginning of&amp;nbsp; fiscal year but&amp;nbsp; when i am&amp;nbsp; trying to get the date 6 months prior&amp;nbsp; to fiscal year&amp;nbsp; (below)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let back_6months= %sysfunc(intnx(month,&amp;amp;YTD_START,-6),yymmdd10.);&lt;/P&gt;
&lt;P&gt;i am&amp;nbsp; getting back_6months=1965-01-01.&amp;nbsp; What do&amp;nbsp; i have wrong here?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2024 16:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930529#M366108</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2024-06-01T16:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: 6 months back</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930531#M366109</link>
      <description>&lt;P&gt;Remove the format from the %let YTD_START = statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let YTD_START = %sysfunc(intnx(year.11, &amp;amp;LASTFRI, 0));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why? Because to do arithmetic or logical operations on macro variables whose values are dates or time or date/times, the value in the macro variable must be unformatted. See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_self"&gt;Maxim 28&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2024 16:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930531#M366109</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-01T16:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: 6 months back</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930536#M366113</link>
      <description>&lt;P&gt;Thank you !!&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2024 17:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-months-back/m-p/930536#M366113</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2024-06-01T17:20:31Z</dc:date>
    </item>
  </channel>
</rss>

