<?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: time difference on multiple day in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231465#M16822</link>
    <description>Thanks SAS KIWI - it worked fine, appreciate your time</description>
    <pubDate>Fri, 23 Oct 2015 23:45:19 GMT</pubDate>
    <dc:creator>woo</dc:creator>
    <dc:date>2015-10-23T23:45:19Z</dc:date>
    <item>
      <title>time difference on multiple day</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231459#M16820</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have start_time and end_time in date format and need difference in hh:mm:ss&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;have&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;start_time &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end_time&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 3:00:00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5:00:00&lt;/P&gt;
&lt;P&gt;21:00:00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25:10:23&lt;/P&gt;
&lt;P&gt;16:25:00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18:50:10&lt;/P&gt;
&lt;P&gt;20:15:34 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20:16:50&amp;nbsp;&lt;/P&gt;
&lt;P&gt;21:00:00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1:25:55 /*here end_time is next day time*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN style="line-height: 20px;"&gt;want&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;time_difference&lt;/P&gt;
&lt;P&gt;2:00:00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;4:10:23 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2:25:23 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;0:01:16 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;4:25:55&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;below logic is working fine but not for last record, it is giving negative number becasue end_time is in next day&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;time_difference=end_time-start_time;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;format time_difference time8.;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 21:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231459#M16820</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-23T21:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: time difference on multiple day</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231463#M16821</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if end_time - start_time &amp;lt; 0 then &lt;SPAN&gt;time_difference&lt;/SPAN&gt; = end_time - start_time + '24:00:00't;
else &lt;SPAN&gt;time_difference&lt;/SPAN&gt; = end_time - start_time; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Oct 2015 22:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231463#M16821</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-10-23T22:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: time difference on multiple day</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231465#M16822</link>
      <description>Thanks SAS KIWI - it worked fine, appreciate your time</description>
      <pubDate>Fri, 23 Oct 2015 23:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/time-difference-on-multiple-day/m-p/231465#M16822</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-23T23:45:19Z</dc:date>
    </item>
  </channel>
</rss>

