<?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: SAS Tip: Program Run Time in SAS Tips from the Community</title>
    <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Program-Run-Time/m-p/475886#M182</link>
    <description>&lt;P&gt;Note that you should use DATETIME() function instead of TIME() so that you can allow for periods that cross from one day into another.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let datetime_start = %sysfunc(datetime()) ;
%put START TIME: %sysfunc(putn(&amp;amp;datetime_start,datetime19));
  ... program code ...
%let datetime_end = %sysfunc(datetime()) ;
%put END TIME: %sysfunc(putn(&amp;amp;datetime_end,datetime19));
%let run_time = %sysevalf(&amp;amp;datetime_end - &amp;amp;datetime_start);
%put PROCESSING TIME:  %sysfunc(putn(&amp;amp;run_time,mmss)) (mm:ss);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jul 2018 13:29:59 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-07-06T13:29:59Z</dc:date>
    <item>
      <title>SAS Tip: Program Run Time</title>
      <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Program-Run-Time/m-p/475833#M178</link>
      <description>&lt;P&gt;A couple of useful things to do with the current time:&lt;/P&gt;
&lt;P&gt;1. Put it at the top and bottom of your program for a quick &amp;amp; easy way of seeing how long a program took to execute.&lt;/P&gt;
&lt;PRE&gt;  e.g.
 &amp;nbsp;%let datetime_start =&amp;nbsp;%sysfunc(TIME())&amp;nbsp;;
 &amp;nbsp;%put START TIME:&amp;nbsp;%sysfunc(datetime(),datetime14.);
  ... program code ...
 &amp;nbsp;%put END TIME:&amp;nbsp;%sysfunc(datetime(),datetime14.);
 &amp;nbsp;%put PROCESSING TIME: &amp;nbsp;%sysfunc(putn(%sysevalf(%sysfunc(TIME())-&amp;amp;datetime_start.),mmss.)) (mm:ss)&amp;nbsp;;
&lt;/PRE&gt;
&lt;P&gt;2. It's also useful to put this in a footnote for output that will be archived.&lt;/P&gt;
&lt;PRE&gt;  e.g.
  footnote2 "%sysfunc(datetime(),datetime14.)";&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;This tip was originally posted by Robert Matthews on sasCommunity.org.&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 21:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Program-Run-Time/m-p/475833#M178</guid>
      <dc:creator>SAS_Tipster</dc:creator>
      <dc:date>2018-07-05T21:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Tip: Program Run Time</title>
      <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Program-Run-Time/m-p/475886#M182</link>
      <description>&lt;P&gt;Note that you should use DATETIME() function instead of TIME() so that you can allow for periods that cross from one day into another.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let datetime_start = %sysfunc(datetime()) ;
%put START TIME: %sysfunc(putn(&amp;amp;datetime_start,datetime19));
  ... program code ...
%let datetime_end = %sysfunc(datetime()) ;
%put END TIME: %sysfunc(putn(&amp;amp;datetime_end,datetime19));
%let run_time = %sysevalf(&amp;amp;datetime_end - &amp;amp;datetime_start);
%put PROCESSING TIME:  %sysfunc(putn(&amp;amp;run_time,mmss)) (mm:ss);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 13:29:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Program-Run-Time/m-p/475886#M182</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-06T13:29:59Z</dc:date>
    </item>
  </channel>
</rss>

