<?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 Date/Time Difference in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448716#M69616</link>
    <description>&lt;P&gt;&amp;nbsp;Hi Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a difficult time converting Date/Time differences into HH:MM. I want to know how many hours and minutes are between two dates. For instance:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EVENT_CAPTURED_DT_SENT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EVENT_CAPTURED_DT_OPEN&lt;/P&gt;&lt;P&gt;02Feb2018 17:31:15.00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01Mar2018 3:40:41.00&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I need the output to express the difference in time as.....354:15 (example of HH:MM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the HMS function, but only giving me the difference in time and not the difference between date/time.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 17:09:02 GMT</pubDate>
    <dc:creator>DrBigAl</dc:creator>
    <dc:date>2018-03-26T17:09:02Z</dc:date>
    <item>
      <title>Date/Time Difference</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448716#M69616</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a difficult time converting Date/Time differences into HH:MM. I want to know how many hours and minutes are between two dates. For instance:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EVENT_CAPTURED_DT_SENT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EVENT_CAPTURED_DT_OPEN&lt;/P&gt;&lt;P&gt;02Feb2018 17:31:15.00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01Mar2018 3:40:41.00&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I need the output to express the difference in time as.....354:15 (example of HH:MM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the HMS function, but only giving me the difference in time and not the difference between date/time.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:09:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448716#M69616</guid>
      <dc:creator>DrBigAl</dc:creator>
      <dc:date>2018-03-26T17:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Difference</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448721#M69617</link>
      <description>&lt;P&gt;Why not just compute the number of hours?&amp;nbsp; (You would have 341.25 instead of 341:15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's easy to obtain, and easy to use in computations down the road:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;duration_hours = (event_captured_dt_open - event_captured_dt_sent) / 3600;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448721#M69617</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-03-26T17:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Difference</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448786#M69624</link>
      <description>&lt;P&gt;the HHMM. format does it for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
sent_dt = '02Feb2018 17:31:15.00'dt;
open_dt = '01Mar2018 3:40:41.00'dt;
interval = open_dt - sent_dt;
format interval hhmm8.;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2018 19:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Time-Difference/m-p/448786#M69624</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-03-26T19:26:06Z</dc:date>
    </item>
  </channel>
</rss>

