<?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: Trying to print out the value for TODAY(); in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486412#M31505</link>
    <description>Awesome! Thank You!</description>
    <pubDate>Mon, 13 Aug 2018 17:00:29 GMT</pubDate>
    <dc:creator>Tater_Salad</dc:creator>
    <dc:date>2018-08-13T17:00:29Z</dc:date>
    <item>
      <title>Trying to print out the value for TODAY();</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486409#M31503</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brand spanking new to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET CURRENT_DAY=TODAY();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;%put 'Today is '&amp;nbsp;&amp;amp;CURRENT_DAY.;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AND I GET:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Today is' TODAY()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I need to do to get the value of TODAY() ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 16:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486409#M31503</guid>
      <dc:creator>Tater_Salad</dc:creator>
      <dc:date>2018-08-13T16:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to print out the value for TODAY();</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486411#M31504</link>
      <description>&lt;P&gt;Try using %SYSFUNC like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET CURRENT_DAY=%sysfunc(TODAY());&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 16:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486411#M31504</guid>
      <dc:creator>jebjur</dc:creator>
      <dc:date>2018-08-13T16:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to print out the value for TODAY();</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486412#M31505</link>
      <description>Awesome! Thank You!</description>
      <pubDate>Mon, 13 Aug 2018 17:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486412#M31505</guid>
      <dc:creator>Tater_Salad</dc:creator>
      <dc:date>2018-08-13T17:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to print out the value for TODAY();</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486413#M31506</link>
      <description>&lt;P&gt;The question indicates perhaps you need to learn a bit more basic SAS coding before attempting the macro language. Macros are often not needed and your time would be better spent learning the basics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; currentdate = today();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; put&amp;nbsp;&amp;nbsp;'Today is '&amp;nbsp;CURRENT_DAY;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT this is likely not what you expect as the date is number of days and a format should be applied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; currentdate = today();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; put&amp;nbsp;&amp;nbsp;'Today is '&amp;nbsp;CURRENT_DAY date9.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use functions from the data step language you need to enclose the call within %sysfunc(today()) to tell the macro language to engage the data step function. Otherwise it only generates text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you may be able to use the automatic SAS variable &amp;amp;sysdate. Maybe. There are some details involved that you should read in the documentation.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 17:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-print-out-the-value-for-TODAY/m-p/486413#M31506</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-13T17:02:44Z</dc:date>
    </item>
  </channel>
</rss>

