<?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 CURRENT year, month and day in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559466#M10327</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') + 1 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%put Fetch_FIN = &amp;amp;Fetch_FIN.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result = 20190501&lt;/P&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;Actually I want to have the result of the current day without needing to add the days (+1...)&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&lt;DIV class="mt-info-text"&gt;Dynamic function&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 16 May 2019 19:47:24 GMT</pubDate>
    <dc:creator>yesidgranadosv</dc:creator>
    <dc:date>2019-05-16T19:47:24Z</dc:date>
    <item>
      <title>CURRENT year, month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559466#M10327</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') + 1 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%put Fetch_FIN = &amp;amp;Fetch_FIN.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result = 20190501&lt;/P&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;Actually I want to have the result of the current day without needing to add the days (+1...)&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&lt;DIV class="mt-info-text"&gt;Dynamic function&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 May 2019 19:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559466#M10327</guid>
      <dc:creator>yesidgranadosv</dc:creator>
      <dc:date>2019-05-16T19:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: CURRENT year, month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559468#M10329</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    today=today(); 
    call symputx('today',today);
    call symputx('year',year(today));
    call symputx('month',month(today));
    call symputx('day',day(today));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm not sure what you are trying to accomplish, and I'm not sure of what the +1 is doing, but some part of the above ought to be what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also say that you most likely DO NOT want a macro variable that has value 20190501, that's pretty useless as a value. You do want a macro variable like TODAY computed above that actually contains the SAS date value for May 1, 2019.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559468#M10329</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-05-16T19:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: CURRENT year, month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559471#M10331</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269250"&gt;@yesidgranadosv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') + 1 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%put Fetch_FIN = &amp;amp;Fetch_FIN.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result = 20190501&lt;/P&gt;
&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="mt-info-text"&gt;Actually I want to have the result of the current day without needing to add the days (+1...)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="mt-info-text"&gt;
&lt;DIV class="mt-info-text"&gt;Dynamic function&lt;/DIV&gt;
&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you describe why if you want "current day" you are messing around with modifying the "month"?. Or do you mean something like "first of the month" instead of "current day"?&lt;/P&gt;
&lt;P&gt;Given that today is 16MAY2019 what is your desired output?&lt;/P&gt;
&lt;P&gt;Note that the +1 is not needed if you expect to get 20190501&lt;/P&gt;
&lt;PRE&gt;248  data _null_;
249  call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') ,yymmddn8.) );
250  run;

NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds


251
252  %put Fetch_FIN = &amp;amp;Fetch_FIN.;
Fetch_FIN = 20190501

&lt;/PRE&gt;
&lt;P&gt;Or is this what you want:&lt;/P&gt;
&lt;PRE&gt;260  data _null_;
261  call symputx('Fetch_FIN', put(today() ,yymmddn8.) );
262  run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


263
264  %put Fetch_FIN = &amp;amp;Fetch_FIN.;
Fetch_FIN = 20190516
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 19:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559471#M10331</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-16T19:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: CURRENT year, month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559473#M10332</link>
      <description>&lt;P&gt;There is no such format as yymmddn8. to translate the SAS date (number) into a string. Try this instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data _null_;
call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') + 1 ,yymmdd10.) );
run;

%put Fetch_FIN = &amp;amp;Fetch_FIN.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 May 2019 20:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559473#M10332</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-16T20:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: CURRENT year, month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559502#M10346</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There is no such format as yymmddn8. to translate the SAS date (number) into a string. Try this instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data _null_;
call symputx('Fetch_FIN', put(intnx ('month',today(),0, 'b') + 1 ,yymmdd10.) );
run;

%put Fetch_FIN = &amp;amp;Fetch_FIN.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;N is an option in the YYMMDDxw. format. When the N replaces the X there is not separator between the year month and day,&lt;/P&gt;
&lt;P&gt;B places a space, C a colon, D a hyphen (dash), P period as separators&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 22:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CURRENT-year-month-and-day/m-p/559502#M10346</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-16T22:04:23Z</dc:date>
    </item>
  </channel>
</rss>

