<?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: macro variable with value of date of today (for example:  10JUL2018 ) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476792#M122722</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need also to create a parameter of 1 year before yeaterday&lt;/P&gt;&lt;P&gt;Why is it not working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let gama=%sysfunc(putn(%sysfunc(intnx('MONTH',today()-1,-1,'s')),date9.));&lt;BR /&gt;%put &amp;amp;gama.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Royein&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 13:21:09 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2018-07-10T13:21:09Z</dc:date>
    <item>
      <title>macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476759#M122705</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I want to create a sas macro variable with value of date of today (for example: &amp;nbsp;10JUL2018 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong with this code?&lt;/P&gt;&lt;P&gt;%let d_today=%sysfunc(PUT(today(),date9.));&lt;BR /&gt;%put &amp;amp;d_today.;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476759#M122705</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T12:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476763#M122708</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let d_today=%sysfunc(putn(%sysfunc(today()),date9.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just a word of advice. If this macro variable is destined to be used in a title or a label, then formatting it via date9. (or any other format) is meaningful. If it is supposed to be used in code, for example in SQL where you want dates in a certain range, or anywhere else in code, don't format it,&amp;nbsp;that's just a wasted step.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476763#M122708</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-10T12:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476772#M122712</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a sas macro variable with value of date of today (for example: &amp;nbsp;10JUL2018 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is wrong with this code?&lt;/P&gt;
&lt;P&gt;%let d_today=%sysfunc(PUT(today(),date9.));&lt;BR /&gt;%put &amp;amp;d_today.;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Two things. First you cannot use PUT() function with %SYSFUNC(). You need to use either PUTN() or PUTC() depending of the type of variable being formatted.&amp;nbsp; Second you need to use %SYSFUNC() with the TODAY() function (a.k.a. the DATE() function).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can eliminate one of the %SYSFUNC() calls by using the format parameter to %SYSFUNC() instead of calling PUTN().&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let d_today=%sysfunc(date(),date9.);
%let now=%sysfunc(datetime(),datetime20.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476772#M122712</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-10T12:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476773#M122713</link>
      <description>&lt;P&gt;99% of the time this is a wasted effort.&amp;nbsp; SAS already provides such a macro variable:&amp;nbsp; &amp;amp;sysdate9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only difference would occur if your program begins before midnight and ends after midnight.&amp;nbsp; In those cases TODAY() changes, but &amp;amp;SYSDATE9 remains the date when the program started to run.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476773#M122713</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-10T12:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476775#M122715</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;sysdate9. ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476775#M122715</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-10T12:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476779#M122716</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let d_today1=%sysfunc(today());&lt;BR /&gt;%put &amp;amp;d_today1.;/*21375*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let d_today2=%sysfunc(today(),date9.);&lt;BR /&gt;%put &amp;amp;d_today2.;/*10JUL2018*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let d_yesterday2=%sysfunc((today()-1),date9.);&lt;BR /&gt;%put &amp;amp;d_yesterday2.;/*error*/&lt;/P&gt;&lt;P&gt;Where &amp;nbsp;calculation of &amp;amp;&lt;SPAN&gt;d_yesterday2. is not working please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476779#M122716</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T13:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476782#M122717</link>
      <description>&lt;P&gt;What is the meaning of the number of&amp;nbsp;%put &amp;amp;sysdate9. &amp;nbsp;?&lt;/P&gt;&lt;P&gt;I see that I get &amp;nbsp;14382&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And IF I run&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let d_today1=%sysfunc(today());&lt;BR /&gt;%put &amp;amp;d_today1.;&lt;/P&gt;&lt;P&gt;then I get 21375 which are number of days since 1.1.1960&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476782#M122717</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T13:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476786#M122719</link>
      <description>&lt;P&gt;As the macro preprocessor is a TEXT processor, it dos not do math on its own (with a very few exceptions).&lt;/P&gt;
&lt;P&gt;%sysfunc expects a data step function as its FIRST argument; it does not accept anything else (like another opening bracket in your case).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to get the macro processor to do math, which is not that trivial:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let d_yesterday2=%sysfunc(putn(%eval(%sysfunc(today())-1),date9.));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476786#M122719</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-10T13:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476787#M122720</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;What is the meaning of the number of&amp;nbsp;%put &amp;amp;sysdate9. &amp;nbsp;?&lt;/P&gt;
&lt;P&gt;I see that I get &amp;nbsp;14382&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And IF I run&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let d_today1=%sysfunc(today());&lt;BR /&gt;%put &amp;amp;d_today1.;&lt;/P&gt;
&lt;P&gt;then I get 21375 which are number of days since 1.1.1960&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try again:&lt;/P&gt;
&lt;PRE&gt;24         %put &amp;amp;sysdate9.;
10JUL2018
&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476787#M122720</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-10T13:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476789#M122721</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;As the macro preprocessor is a TEXT processor, it dos not do math on its own (with a very few exceptions).&lt;/P&gt;
&lt;P&gt;%sysfunc expects a data step function as its FIRST argument; it does not accept anything else (like another opening bracket in your case).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to get the macro processor to do math, which is not that trivial:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let d_yesterday2=%sysfunc(putn(%eval(%sysfunc(today())-1),date9.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In general you are right that the macro processor does not do math.&amp;nbsp; But the %SYSFUNC() function mechanism (or perhaps the PUTN() function itself) can do the math so the %EVAL() is not needed in this example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1979  %put %sysfunc(putn(%sysfunc(today())-1,date9.));
09JUL2018
&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476789#M122721</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-10T13:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476792#M122722</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need also to create a parameter of 1 year before yeaterday&lt;/P&gt;&lt;P&gt;Why is it not working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let gama=%sysfunc(putn(%sysfunc(intnx('MONTH',today()-1,-1,'s')),date9.));&lt;BR /&gt;%put &amp;amp;gama.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Royein&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476792#M122722</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T13:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476796#M122726</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need also to create a parameter of 1 year before yeaterday&lt;/P&gt;
&lt;P&gt;Why is it not working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let gama=%sysfunc(putn(%sysfunc(intnx('MONTH',today()-1,-1,'s')),date9.));&lt;BR /&gt;%put &amp;amp;gama.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Royein&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since the macro processor is a TEXT processor, quotes are not needed and in fact wrong. And you need to use %eval for calculations.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gama=%sysfunc(putn(%sysfunc(intnx(year,%eval(%sysfunc(today())-1),-1,s)),date9.));
%put &amp;amp;gama.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476796#M122726</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-10T13:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476797#M122727</link>
      <description>&lt;P&gt;Funny&lt;/P&gt;&lt;P&gt;I am located now in Cyprus and date here is 10JUL2018&lt;/P&gt;&lt;P&gt;But I get&amp;nbsp;&lt;SPAN&gt;09JUL2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe date of SAS in my computer is not defined in Cyprus?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476797#M122727</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T13:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476799#M122728</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need also to create a parameter of 1 year before yeaterday&lt;/P&gt;
&lt;P&gt;Why is it not working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let gama=%sysfunc(putn(%sysfunc(intnx('MONTH',today()-1,-1,'s')),date9.));&lt;BR /&gt;%put &amp;amp;gama.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Royein&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here is what you need.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gama=%sysfunc(intnx(month,%sysfunc(today())-1,-1,s),date9.);
%put &amp;amp;gama.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Let's look at it from the outside in.&lt;/P&gt;
&lt;P&gt;1) Call the %SYSFUNC() macro function to access the INTNX() function and format the resulting value using the DATE9. format.&lt;/P&gt;
&lt;P&gt;2) For the INTNX() function call using the MONTH interval starting with the day before today and going back one month using the same same day of the month.&lt;/P&gt;
&lt;P&gt;3) Use the %SYSFUNC() macro function to access the TODAY() function and return the result using defualt BEST format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look at your call you will see that you tried to use the TODAY() function without wrapping it into the %SYSFUNC() macro function. You also told the INTNX() function to use the 'MONTH' interval instead of the MONTH interval.&amp;nbsp; In macro coding you do not need to add quotes around strings. Everything is a string to macro code.&amp;nbsp; It is the &amp;amp; and % triggers that cause the macro processor to operate on the code.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476799#M122728</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-10T13:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable with value of date of today (for example:  10JUL2018 )</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476805#M122730</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Funny&lt;/P&gt;
&lt;P&gt;I am located now in Cyprus and date here is 10JUL2018&lt;/P&gt;
&lt;P&gt;But I get&amp;nbsp;&lt;SPAN&gt;09JUL2018&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe date of SAS in my computer is not defined in Cyprus?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's because (as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt; already mentioned) &amp;amp;sysdate9 is set when the SAS session starts, and yours probably was started yesterday.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable-with-value-of-date-of-today-for-example-10JUL2018/m-p/476805#M122730</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-10T13:41:30Z</dc:date>
    </item>
  </channel>
</rss>

