<?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: How to calculate the average time of day a job will finish with end_time field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181255#M52258</link>
    <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;P&gt;(your search)|eval endtime_epoc=strptime(end_time,"%d/%m/%Y %I:%M:%S %P")|eval date=strftime(endtime_epoc,"%d/%m/%Y")|stats avg(endtime_epoc) as avg_endtime by date|eval avg_endtime=strftime(avg_endtime,"%I:%M:%S %P")|table date,avg_endtime&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:20:02 GMT</pubDate>
    <dc:creator>HiroshiSatoh</dc:creator>
    <dc:date>2020-09-28T17:20:02Z</dc:date>
    <item>
      <title>How to calculate the average time of day a job will finish with end_time field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181252#M52255</link>
      <description>&lt;P&gt;I have a table which has start_time &amp;amp; end_time of some jobs. Now i want to calculate the average at what point of time in a day the job ends.&lt;/P&gt;

&lt;P&gt;start_time                  end_time&lt;BR /&gt;
13/03/2014 11:12:29 am      13/03/2014 11:25:23 am&lt;BR /&gt;
13/03/2014 12:02:05 pm      13/03/2014 12:15:29 pm&lt;BR /&gt;
13/03/2014 12:29:00 pm      13/03/2014 12:58:20 pm&lt;BR /&gt;
13/03/2014 01:00:30 pm      13/03/2014 01:12:59 pm&lt;/P&gt;

&lt;P&gt;My average of end_time should tell me something like daily at "12:10:23 pm" the job will be finished.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181252#M52255</guid>
      <dc:creator>allan_newton</dc:creator>
      <dc:date>2020-09-28T17:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the average time of day a job will finish with end_time field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181253#M52256</link>
      <description>&lt;P&gt;You could append this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval epoch_end = strptime(end_time, "%d/%m/%Y %H:%M:%S") | stats avg(epoch_end) as avg_epoch_end | eval avg_end = strftime(avg_epoch_end, "%d/%m/%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Aug 2014 07:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181253#M52256</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-14T07:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the average time of day a job will finish with end_time field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181254#M52257</link>
      <description>&lt;P&gt;Send your table output to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval endtime_epoc=strptime(end_time, "%d/%m/%Y %I:%M:%S %p") | eval day_seconds=endtime_epoc%86400 | stats list(start_time) list(end_time) avg(day_seconds) as avg_day_seconds | eval avg_endtime=strftime(avg_day_seconds, "%I:%M:%S %p")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Aug 2014 07:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181254#M52257</guid>
      <dc:creator>datasearchninja</dc:creator>
      <dc:date>2014-08-14T07:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the average time of day a job will finish with end_time field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181255#M52258</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;P&gt;(your search)|eval endtime_epoc=strptime(end_time,"%d/%m/%Y %I:%M:%S %P")|eval date=strftime(endtime_epoc,"%d/%m/%Y")|stats avg(endtime_epoc) as avg_endtime by date|eval avg_endtime=strftime(avg_endtime,"%I:%M:%S %P")|table date,avg_endtime&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-average-time-of-day-a-job-will-finish-with/m-p/181255#M52258</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2020-09-28T17:20:02Z</dc:date>
    </item>
  </channel>
</rss>

