<?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: Issue with doing math on event times? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31045#M178070</link>
    <description>&lt;P&gt;We are all very lucky that Splunk's manual is really well done &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2011 00:40:36 GMT</pubDate>
    <dc:creator>Paolo_Prigione</dc:creator>
    <dc:date>2011-01-27T00:40:36Z</dc:date>
    <item>
      <title>Issue with doing math on event times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31042#M178067</link>
      <description>&lt;P&gt;Here is my current code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sandbox" sourcetype="AS-CDR" | where Called_Number="2155551060" OR
       Calling_Number="2155551060" OR
       Called_Number="12155551060" OR
       Calling_Number="12155551060" OR
       Called_Number="+12155551060" OR
       Calling_Number="+12155551060" |eval timeToAnswer=(strptime(Answer_Time, "%Y%m%d%H%M%S.%q") - strptime(Start_Time, "%Y%m%d%H%M%S.%q"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I attempt to perform that operation, it doesn't give me any value for timeToAnswer, even though the operator is supposed to create a new column that can be used. I know it works because I can take an average using avg(timeToAnswer) and get a result. But if I try to append&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|fields Start_Time Answer_Time timeToAnswer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It doesn't show. Can anyone explain how to fix this? The timestamps are in the following format:&lt;/P&gt;

&lt;P&gt;20110119212921.053&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2011 05:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31042#M178067</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2011-01-25T05:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with doing math on event times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31043#M178068</link>
      <description>&lt;P&gt;If you select the timeToAnswer field from the field picker, does it show its top 10 values? &lt;/P&gt;

&lt;P&gt;"fields" is not used to display a field under the raw text of the events. You can use the field picker on the left to "always show" the field timeToAnswer or the &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table Start_Time Answer_Time timeToAnswer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;command to display tabular results.
Let us know if it worked!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2011 21:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31043#M178068</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2011-01-25T21:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with doing math on event times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31044#M178069</link>
      <description>&lt;P&gt;Thanks! Reading through the manual is a pretty good exercise, I should try it more often &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 23:55:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31044#M178069</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2011-01-26T23:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with doing math on event times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31045#M178070</link>
      <description>&lt;P&gt;We are all very lucky that Splunk's manual is really well done &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2011 00:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-doing-math-on-event-times/m-p/31045#M178070</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2011-01-27T00:40:36Z</dc:date>
    </item>
  </channel>
</rss>

