<?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: Adding clock times?? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35976#M8968</link>
    <description>Hello G.I.Jeff,&lt;BR /&gt;
&lt;BR /&gt;
It could be solved by this way, for example,&lt;BR /&gt;
[pre]&lt;BR /&gt;
data t;&lt;BR /&gt;
  input time time10. ;&lt;BR /&gt;
  format time time10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
12:24:13&lt;BR /&gt;
14:33:01&lt;BR /&gt;
29:01:44&lt;BR /&gt;
00:13:59&lt;BR /&gt;
100:51:19&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create table r as&lt;BR /&gt;
  select ROUND(sum(time)/60) as r&lt;BR /&gt;
  from t&lt;BR /&gt;
;quit; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
    <pubDate>Thu, 18 Nov 2010 21:33:00 GMT</pubDate>
    <dc:creator>SPR</dc:creator>
    <dc:date>2010-11-18T21:33:00Z</dc:date>
    <item>
      <title>Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35971#M8963</link>
      <description>Sorry if this has been posted, but I've searched through the forums and didn't find my answer.&lt;BR /&gt;
I need to add thousands of clock time values together and represent the sum in minutes (example):&lt;BR /&gt;
&lt;BR /&gt;
12:24:13&lt;BR /&gt;
14:33:01&lt;BR /&gt;
29:01:44&lt;BR /&gt;
00:13:59&lt;BR /&gt;
&lt;U&gt;100:51:19&lt;/U&gt;&lt;BR /&gt;
9124:16&lt;BR /&gt;
&lt;BR /&gt;
I'm new to SAS and am accumulating total clock time values together per customer. The input is already coming in a SAS TIME format. When I summarize all the times, I am getting an HHH:MM:SS result. I realize it would be easy to multiply the summary hours by 60 and add to the minutes but I also need to represent other entries that are not summarized.&lt;BR /&gt;
&lt;BR /&gt;
So out of curiosity, is there a way to format summarized values in minutes? Or is there a way to converted stored, formatted times back to SAS times (stored in seconds from midnight)?</description>
      <pubDate>Thu, 18 Nov 2010 15:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35971#M8963</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2010-11-18T15:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35972#M8964</link>
      <description>SAS TIME variables are numeric type variables representing "seconds" -- the decision on how the data values is displayed is determined using the FORMAT statement (or ATTRIB FORMAT= parameter).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
using dates and times site:sas.com</description>
      <pubDate>Thu, 18 Nov 2010 15:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35972#M8964</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-11-18T15:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35973#M8965</link>
      <description>I understand that SAS TIME variables are numeric values representing seconds from midnight, but when I perform a proc print from the data I am summarizing (before I do anything with it), it is printing the times in TIME8. format without me coding a FORMAT on my print. How can I get the times back to the SAS (default) numeric value, or represent my total in minutes?</description>
      <pubDate>Thu, 18 Nov 2010 18:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35973#M8965</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2010-11-18T18:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35974#M8966</link>
      <description>If PRINT displays the value using TIME8. format without you specifying the format, then the format has already been attached to the variable.  Format assignments are usually inherited from earlier steps.  &lt;BR /&gt;
&lt;BR /&gt;
PROC CONTENTS will show the format assignments for the variables in your data set.&lt;BR /&gt;
&lt;BR /&gt;
Formats do not alter what is stored only how the value is to be displayed.</description>
      <pubDate>Thu, 18 Nov 2010 18:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35974#M8966</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-11-18T18:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35975#M8967</link>
      <description>Have you tried the MMSS. format that displays SAS times in minutes and seconds?</description>
      <pubDate>Thu, 18 Nov 2010 20:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35975#M8967</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2010-11-18T20:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding clock times??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35976#M8968</link>
      <description>Hello G.I.Jeff,&lt;BR /&gt;
&lt;BR /&gt;
It could be solved by this way, for example,&lt;BR /&gt;
[pre]&lt;BR /&gt;
data t;&lt;BR /&gt;
  input time time10. ;&lt;BR /&gt;
  format time time10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
12:24:13&lt;BR /&gt;
14:33:01&lt;BR /&gt;
29:01:44&lt;BR /&gt;
00:13:59&lt;BR /&gt;
100:51:19&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create table r as&lt;BR /&gt;
  select ROUND(sum(time)/60) as r&lt;BR /&gt;
  from t&lt;BR /&gt;
;quit; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Thu, 18 Nov 2010 21:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-clock-times/m-p/35976#M8968</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-11-18T21:33:00Z</dc:date>
    </item>
  </channel>
</rss>

