<?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: Facing an issue with intnx function in SAS 9.4 M3. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548765#M8564</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let todaysDate=%sysfunc(intnx(week.2,%sysfunc(inputn(01042019,ddmmyy8.)),1,b),date9.) ;
%put &amp;amp;todaysDate.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Apr 2019 13:45:43 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-04-05T13:45:43Z</dc:date>
    <item>
      <title>Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548757#M8562</link>
      <description>&lt;P&gt;We need to get a dynamic date value for every Monday. The code We have been trying is as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let todaysDate=%sysfunc(intnx(week.2,%sysfunc(inputn(01042019,ddmmyyn8.)),1,b)) ;&lt;BR /&gt;%put &amp;amp;todaysDate.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I am getting is as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GOPTIONS ACCESSIBLE;%let todaysDate=%sysfunc(intnx(week.2,%sysfunc(inputn(01042019,ddmmyyn8.)),1,b)) ;&lt;BR /&gt;%put &amp;amp;todaysDate.;&lt;BR /&gt;SYMBOLGEN: Macro variable TODAYSDATE resolves to 1042023&lt;BR /&gt;1042023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the doubt is why Year value is changing&amp;nbsp;instead Date value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please clarify us and give us a solution for it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bunch of Thanks in Advance !! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548757#M8562</guid>
      <dc:creator>Lakshmi_G90</dc:creator>
      <dc:date>2019-04-05T13:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548765#M8564</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let todaysDate=%sysfunc(intnx(week.2,%sysfunc(inputn(01042019,ddmmyy8.)),1,b),date9.) ;
%put &amp;amp;todaysDate.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548765#M8564</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-04-05T13:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548767#M8565</link>
      <description>&lt;P&gt;Instead of using&amp;nbsp;&amp;nbsp;&amp;nbsp; inputn(01042019,ddmmyyn8.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the automatic macrovar &amp;amp;SYSDATE9, as in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputn(&amp;amp;sysdate9,date9.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can generate&amp;nbsp;1 week.2 forward with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let todaysDate=%sysfunc(intnx(week.2,%sysfunc(inputn(&amp;amp;sysdate9,date9.)),1,b),date9.);
%put &amp;amp;=todaysdate;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which today (4/5/2019) generates&amp;nbsp;&amp;nbsp; 08APR2019.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the rightmost format to your preference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548767#M8565</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-04-05T13:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548768#M8566</link>
      <description>&lt;P&gt;Thank you for your quick response &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;. Is there any specific reason that the code which I was trying not working?.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548768#M8566</guid>
      <dc:creator>Lakshmi_G90</dc:creator>
      <dc:date>2019-04-05T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548770#M8567</link>
      <description>&lt;P&gt;There is no informat with that name, so it is just returning&amp;nbsp;&lt;SPAN&gt;1,042,019 as the date.&amp;nbsp; That is in the year 4812.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To convert 01042019 to a date us the DDMMYY informat.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548770#M8567</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-05T13:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548787#M8570</link>
      <description>&lt;P&gt;Thanks to everyone for your response and solution also.&lt;/P&gt;&lt;P&gt;Here we have an another doubt,&lt;/P&gt;&lt;P&gt;We have weekly loads on every Monday with the time stamp in file name (say- Base_01042019.csv).&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to read the file names by giving dynamic date values.&lt;/P&gt;&lt;P&gt;Here, if I give the below codes then It will refer every coming Monday date,&amp;nbsp; then the file will not be available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest me in this case how can we read the files with out the job gets fail.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 14:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548787#M8570</guid>
      <dc:creator>Lakshmi_G90</dc:creator>
      <dc:date>2019-04-05T14:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548791#M8572</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227927"&gt;@Lakshmi_G90&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks to everyone for your response and solution also.&lt;/P&gt;
&lt;P&gt;Here we have an another doubt,&lt;/P&gt;
&lt;P&gt;We have weekly loads on every Monday with the time stamp in file name (say- Base_01042019.csv).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to read the file names by giving dynamic date values.&lt;/P&gt;
&lt;P&gt;Here, if I give the below codes then It will refer every coming Monday date,&amp;nbsp; then the file will not be available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest me in this case how can we read the files with out the job gets fail.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Need more details. You can also get a list of files from a directory and find all files after a specific date or use the modified/created date from the metadata. Check the SAS Macro Appendix for an example of how get a list of files.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 14:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/548791#M8572</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-05T14:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Facing an issue with intnx function in SAS 9.4 M3.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/549505#M8684</link>
      <description>&lt;P&gt;Thanks to Everyone for your support and suggestions.&lt;/P&gt;&lt;P&gt;We fulfilled our requirement with your support successfully. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 07:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Facing-an-issue-with-intnx-function-in-SAS-9-4-M3/m-p/549505#M8684</guid>
      <dc:creator>Lakshmi_G90</dc:creator>
      <dc:date>2019-04-09T07:27:42Z</dc:date>
    </item>
  </channel>
</rss>

