<?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: Convert HH:MM to days hours and minutes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114431#M259235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Dorota!!!! This is the one I was looking for easy to understand.&amp;nbsp; This helped me to solved my issue. This is the perfect answer for me . It s my first time in this blog&lt;/P&gt;&lt;P&gt;Great help!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Jul 2012 18:27:25 GMT</pubDate>
    <dc:creator>mimi</dc:creator>
    <dc:date>2012-07-21T18:27:25Z</dc:date>
    <item>
      <title>Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114426#M259230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I need to convert a varible with HH:MM(eg .&amp;nbsp; 76:02) to 3 days, 2hours and 02 minutes.&lt;/P&gt;&lt;P&gt; The&amp;nbsp; value is stored as numeric. I coverted it to time5. format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 23:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114426#M259230</guid>
      <dc:creator>mimi</dc:creator>
      <dc:date>2012-07-20T23:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114427#M259231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;informat time $5.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input time ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 76:02&lt;/P&gt;&lt;P&gt;&amp;nbsp; 72:40&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data want(drop=h time);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; h=input(scan(time,1,':'),4.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; min=input(scan(time,2,':'),2.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do days=0 to 999 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; hours=h-24*days;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if hours &amp;lt;24 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; leave;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 00:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114427#M259231</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-21T00:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114428#M259232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;each Mimi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time is counted in seconds. To get number of days you need to divide the time variable by number of seconds, i.e. 24*60*60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data a;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;informat time_var time5. ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;input time_var;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;format&amp;nbsp; time_var time5. days best8. time time5.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;days=floor(time_var/(24*60*60));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;time=time_var - days*24*60*60;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hours=floor(time/(60*60));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;minutes=time/60-hours*60;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;seconds=time - hours*(60*60) - minutes*(60);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;days_hrs_min=put(days, best4.)||" days "||put(hours,2.)||" hours "||put(minutes,2.)||" minutes";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;cards;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;76:02&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;72:40&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc print data=a;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;var time_var days hours minutes days_hrs_min;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; time_var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; days&amp;nbsp;&amp;nbsp;&amp;nbsp; hours&amp;nbsp;&amp;nbsp;&amp;nbsp; minutes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; days_hrs_min&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76:02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 days&amp;nbsp; 4 hours&amp;nbsp; 2 minutes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 72:40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 days&amp;nbsp; 0 hours 40 minutes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if you assigned the time5. format to the time variable, the entire value is still available and you can use a different format or deassign a format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format time_var;&lt;/P&gt;&lt;P&gt;Then you will have a numerical variable represnting the number of seconds.&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Dorota&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Dorota Jarosz added code to calculate days, hours, minutes and a character string concatenating all three.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 00:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114428#M259232</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2012-07-21T00:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114429#M259233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just another way of doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;&amp;nbsp; picture mytime&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-high='%H hours %M minutes' (datatype=time)&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; time='36:12't;&lt;BR /&gt;&amp;nbsp; if time ne . then string=catx(' ',put(floor(time/'24:00't),8.),'day',put(mod(time,86400),mytime.));&lt;BR /&gt;&amp;nbsp; put string=;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 05:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114429#M259233</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-07-21T05:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114430#M259234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sooo much Lin.&amp;nbsp; I tried this way.&amp;nbsp; I was getting some errors.&lt;/P&gt;&lt;P&gt;Iwas looking for some functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 18:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114430#M259234</guid>
      <dc:creator>mimi</dc:creator>
      <dc:date>2012-07-21T18:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114431#M259235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Dorota!!!! This is the one I was looking for easy to understand.&amp;nbsp; This helped me to solved my issue. This is the perfect answer for me . It s my first time in this blog&lt;/P&gt;&lt;P&gt;Great help!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 18:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114431#M259235</guid>
      <dc:creator>mimi</dc:creator>
      <dc:date>2012-07-21T18:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114432#M259236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patric, Great one . works perfectly !!!&amp;nbsp; simple with less code. Thank you all foor the fast response!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 18:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114432#M259236</guid>
      <dc:creator>mimi</dc:creator>
      <dc:date>2012-07-21T18:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114433#M259237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am glad I could help. It would be nice if you could select the best answer and mark your inquiry as Answered, so other users hunting for open problems know this one is answered&amp;nbsp; - they will still be able to contribute their opinion. I am a newbie here, too. At first I could not find the option to select the best answer to my own stated problem. I believe you have to click on the header link in a particular post and then several options appear. You can select the best answer as well as several helpful answers.&amp;nbsp; Blog participants earn (accumulate) higher experience this way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 19:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114433#M259237</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2012-07-21T19:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114434#M259238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not getting any errors with Linlin's code. Perhaps your data may have larger number of hours than 99, then the $5. informat will be insufficient. You may change it to $6. or more, if necessary. &lt;/P&gt;&lt;P&gt;However, in the loop calculating the division modulo 24 hours, I would use a "do while" loop rather than "leave;" or "stop;" statement to jump out of the loop. But this is a matter of programming style (old school).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 19:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114434#M259238</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2012-07-23T19:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert HH:MM to days hours and minutes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114435#M259239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you were so close!&lt;/P&gt;&lt;P&gt;The picture format should perform the whole job - days included&lt;/P&gt;&lt;P&gt;(ok as long as the number of days is less than 29 (in Feb, or 30/31 as appropriate)&lt;/P&gt;&lt;P&gt;Adapting Patrick's proc format code, here is a SASlog snippet&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;70&amp;nbsp;&amp;nbsp; proc format;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;71&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; picture mytime&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low-high=' %d days %H hours %M minutes'(datatype=datetime)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;73&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0070c0; font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;NOTE: Format MYTIME has been output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put %sysfunc( dhms( 3,15,23,0), mytime );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;4 days 15 hours 23 minutes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;75&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0070c0; line-height: 115%; font-family: 'SAS Monospace'; font-size: 8pt; mso-bidi-font-family: 'SAS Monospace';"&gt;NOTE: PROCEDURE FORMAT used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(showing perhaps why Patrick used another method to report the "day")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I needed to re-think:&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;With little improvement on Patrick's code, my "one-liner" becomes&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New;"&gt;( intnx( dtday, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New;"&gt;( dhms( 3,15,23,0 )), -1, s ), mytime );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;where in INTNX, the DTDAY interval deducts 1 day from the "datetime" value while the "S" parameter keeps the same time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;and the result was&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3 days 15 hours 23 minutes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was disappointing that in my SAS9.3 the PROC FORMAT %n directrive didn't provide the duration days, just 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s.&lt;/P&gt;&lt;P&gt;dhms( 3,15,23,0)&lt;/P&gt;&lt;P&gt;provides the datetime value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Peter Crawford&#xD;
&#xD;
once the duration directive %n is working, this approach will be better.&#xD;
otherwise special arrangements are needed for duration of less than one day (instead of 0 it reports 31 from 31Dec1959 !)&#xD;
&#xD;
maybe later!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 20:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-HH-MM-to-days-hours-and-minutes/m-p/114435#M259239</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-07-23T20:34:17Z</dc:date>
    </item>
  </channel>
</rss>

