<?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 transform a field into a time format? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231464#M68666</link>
    <description>&lt;P&gt;Does this really work?  First of all, it is not syntactically correct (missing &lt;CODE&gt;eval&lt;/CODE&gt;).  Secondly it generates a &lt;CODE&gt;time_t&lt;/CODE&gt;, not a duration.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2016 16:05:46 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-08-12T16:05:46Z</dc:date>
    <item>
      <title>How to transform a field into a time format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231461#M68663</link>
      <description>&lt;P&gt;I extracted deployment time from events and it's currently in this format &lt;CODE&gt;0:04.645&lt;/CODE&gt; and &lt;CODE&gt;1:30.123&lt;/CODE&gt; and is in terms of Minutes, Seconds, Milliseconds. I need to sum this time up every day and graph it. &lt;/P&gt;

&lt;P&gt;How can I put this in a time format in seconds? &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;0:04.645&lt;BR /&gt;
1:30.123&lt;/P&gt;

&lt;P&gt;sum = 94.768 seconds &lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 19:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231461#M68663</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2015-09-18T19:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform a field into a time format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231462#M68664</link>
      <description>&lt;P&gt;Use the strptime command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... |eval atime=strptime(fieldname, "%M:%S.%3N")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2015 20:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231462#M68664</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-09-18T20:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform a field into a time format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231463#M68665</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;tostring&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | rex field=field1 "(?&amp;lt;H&amp;gt;.*?))?:?((?&amp;lt;M&amp;gt;.*?))?:?(?&amp;lt;S&amp;gt;.*?)" | fillnull value=0 | eval onlySeconds1 =  S + 60*(M + 60*H) | rex field=field2 "(?&amp;lt;H&amp;gt;.*?))?:?((?&amp;lt;M&amp;gt;.*?))?:?(?&amp;lt;S&amp;gt;.*?)" | fillnull value=0 | eval onlySeconds2 =  S + 60*(M + 60*H) | eval =sumSeconds = onlySeconds1 + onlySeconds2 | eval sumTime = tostring(sumSeconds, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2015 20:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231463#M68665</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-18T20:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform a field into a time format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231464#M68666</link>
      <description>&lt;P&gt;Does this really work?  First of all, it is not syntactically correct (missing &lt;CODE&gt;eval&lt;/CODE&gt;).  Secondly it generates a &lt;CODE&gt;time_t&lt;/CODE&gt;, not a duration.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 16:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transform-a-field-into-a-time-format/m-p/231464#M68666</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-08-12T16:05:46Z</dc:date>
    </item>
  </channel>
</rss>

