<?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 How to print the current date and time in the SAS Output window in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35804#M8882</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I came across this article on "How to print the current date and time in the SAS Output window instead of the date and time that the SAS session was started" on Support.sas.com,also there is a sample code:&lt;BR /&gt;
&lt;BR /&gt;
options nodate;&lt;BR /&gt;
   data _null_;&lt;BR /&gt;
     call symput ('timenow',put (time(),time.));&lt;BR /&gt;
     call symput ('datenow',put (date(),date9.));&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
   title "The current time is &amp;amp;timenow and the date is &amp;amp;datenow";&lt;BR /&gt;
&lt;BR /&gt;
I am using sas 9.1.3,but when i tried to run this ,i dont see any values displayed,and do not see any error messages in the log.I appreciate if anyone has any idea why this is happening.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Ren</description>
    <pubDate>Wed, 30 Dec 2009 16:21:01 GMT</pubDate>
    <dc:creator>ren2010</dc:creator>
    <dc:date>2009-12-30T16:21:01Z</dc:date>
    <item>
      <title>How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35804#M8882</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I came across this article on "How to print the current date and time in the SAS Output window instead of the date and time that the SAS session was started" on Support.sas.com,also there is a sample code:&lt;BR /&gt;
&lt;BR /&gt;
options nodate;&lt;BR /&gt;
   data _null_;&lt;BR /&gt;
     call symput ('timenow',put (time(),time.));&lt;BR /&gt;
     call symput ('datenow',put (date(),date9.));&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
   title "The current time is &amp;amp;timenow and the date is &amp;amp;datenow";&lt;BR /&gt;
&lt;BR /&gt;
I am using sas 9.1.3,but when i tried to run this ,i dont see any values displayed,and do not see any error messages in the log.I appreciate if anyone has any idea why this is happening.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Ren</description>
      <pubDate>Wed, 30 Dec 2009 16:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35804#M8882</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2009-12-30T16:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35805#M8883</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; Are you following your TITLE statement with a procedure or some process that -uses- a TITLE statement??? Normally, the title statement by itself just changes the title in the SAS "holding area" for titles. You wouldn't see the results of the TITLE statement unless you did this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate;
data _null_;
call symput ('timenow',put (time(),time.));
call symput ('datenow',put (date(),date9.));
run;

title "The current time is &amp;amp;timenow and the date is &amp;amp;datenow";
ods listing;
proc print data=sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13604"&gt;@Doc_Duke&lt;/a&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Be aware that the title is somewhat misleading. That method prints the date and time the DATA _NULL_; step was run, not the "current" date and time (It was current then but may not be current when printed.). That doesn't matter much for short jobs, but can be an important difference in definition for ones that run for hours or days. Look at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://support.sas.com/kb/8/682.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://support.sas.com/kb/8/682.html&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for an option that gets "closer" to current.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35805#M8883</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-12-04T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35806#M8884</link>
      <description>It's not until your next PROC or DATA step execution will reflect the current TITLE declared.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 30 Dec 2009 16:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35806#M8884</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-30T16:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35807#M8885</link>
      <description>Thanks Cynthia</description>
      <pubDate>Wed, 30 Dec 2009 17:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35807#M8885</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2009-12-30T17:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35808#M8886</link>
      <description>Thanks Scott</description>
      <pubDate>Wed, 30 Dec 2009 17:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35808#M8886</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2009-12-30T17:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to print the current date and time in the SAS Output window</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35809#M8887</link>
      <description>Be aware that the title is somewhat misleading.  That method prints the date and time the DATA _NULL_; step was run, not the "current" date and time (It was current then but may not be current when printed.).  That doesn't matter much for short jobs, but can be an important difference in definition for ones that run for hours or days.  Look at &lt;A href="http://support.sas.com/kb/8/682.html" target="_blank"&gt;http://support.sas.com/kb/8/682.html&lt;/A&gt; for an option that gets "closer" to current.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Wed, 30 Dec 2009 20:28:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-print-the-current-date-and-time-in-the-SAS-Output-window/m-p/35809#M8887</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-12-30T20:28:06Z</dc:date>
    </item>
  </channel>
</rss>

