<?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 How do I calculate the mean and sum of time in HH:SS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529735#M144788</link>
    <description>&lt;P&gt;I need help calculating the mean and sum of time entries so that the outputs is in HHMM and not numeric. SA&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 16:25:24 GMT</pubDate>
    <dc:creator>samenumey</dc:creator>
    <dc:date>2019-01-24T16:25:24Z</dc:date>
    <item>
      <title>How do I calculate the mean and sum of time in HH:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529735#M144788</link>
      <description>&lt;P&gt;I need help calculating the mean and sum of time entries so that the outputs is in HHMM and not numeric. SA&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529735#M144788</guid>
      <dc:creator>samenumey</dc:creator>
      <dc:date>2019-01-24T16:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the mean and sum of time in HH:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529741#M144791</link>
      <description>&lt;P&gt;You know that movie ("Jerry Maguire") where a famous statement is "show me the money!"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the data.&amp;nbsp; Help us to help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input tim  time8.0:
  format tim time8.0;
datalines;
10:50:49
15:20:45
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;data in the form of a sas data step to get extra credit, as in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529741#M144791</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-01-24T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the mean and sum of time in HH:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529743#M144792</link>
      <description>&lt;P&gt;Without numeric values "mean" and "sum" are kind of meaningless in many contexts.&lt;/P&gt;
&lt;P&gt;If you have SAS time values then you can use any of a number of procs to create the values. To assign a specific display format might require another step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this were my data I would start with something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc summary data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var timevariable;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=want&amp;nbsp;&amp;nbsp; sum=timesum mean=timemean;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var timesum timemean;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; format timesum timemean hhmm8.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The width of HHMM format would depend somewhat on the expected range of values, you could go to 20, if you want to show fractions of a minute include the number of decimals you want displayed such as hhmm10.2 would use 10 characters for display with 2 decimal places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The FORMAT is how a value displays, the values are numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529743#M144792</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-24T16:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the mean and sum of time in HH:MM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529758#M144800</link>
      <description>&lt;P&gt;Thanks! This worked.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 17:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-calculate-the-mean-and-sum-of-time-in-HH-SS/m-p/529758#M144800</guid>
      <dc:creator>samenumey</dc:creator>
      <dc:date>2019-01-24T17:00:41Z</dc:date>
    </item>
  </channel>
</rss>

