<?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: Conver string to time duration. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93391#M24056</link>
    <description>&lt;P&gt;THANK YOU!!! this worked perfectly.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2013 18:22:34 GMT</pubDate>
    <dc:creator>marquiselee</dc:creator>
    <dc:date>2013-10-11T18:22:34Z</dc:date>
    <item>
      <title>Conver string to time duration.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93387#M24052</link>
      <description>&lt;P&gt;Hi I have logs where the media length/duration is displayed in a non standard format.  anyone think this can be converted into seconds?  *In some cases duration is reported as 0 too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#   MEDIA ID   Duration

1       69911   1h 50mn
2       74454   1h 9mn
3       69910   1mn 58s
4       69909   59s 221ms
5       74453   17mn 4s
6       74452   2h 13mn
7       74451   0
8       74450   56s 134ms
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Oct 2013 20:18:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93387#M24052</guid>
      <dc:creator>marquiselee</dc:creator>
      <dc:date>2013-10-10T20:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conver string to time duration.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93388#M24053</link>
      <description>&lt;P&gt;is this within a single event? And there are no timestamps, field extractions etc etc&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 21:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93388#M24053</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-10T21:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conver string to time duration.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93389#M24054</link>
      <description>&lt;P&gt;each mediaid is from a distinct xml log file that is indexed.  I should note that duration is not from a transaction but rather from the xml file. &lt;/P&gt;

&lt;P&gt;...| xmlkv | table "MEDIA ID" "Duration"&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 14:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93389#M24054</guid>
      <dc:creator>marquiselee</dc:creator>
      <dc:date>2013-10-11T14:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conver string to time duration.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93390#M24055</link>
      <description>&lt;P&gt;I'm not sure exactly what you want to convert the duration into.  Something like this will put it in hh:mm:ss format.  Or you could drop the tostring() call and just display the secs field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=Duration "((?&amp;lt;Hrs&amp;gt;.*?)hr)?\s?((?&amp;lt;Mins&amp;gt;.*?)mn)?\s?((?&amp;lt;Sec&amp;gt;.*?)s)?" | fillnull value=0 | eval secs=(Hrs*3600)+Mins*60+Sec | eval Time=tostring(secs, "duration") | table Duration, Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2013 16:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93390#M24055</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2013-10-11T16:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Conver string to time duration.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93391#M24056</link>
      <description>&lt;P&gt;THANK YOU!!! this worked perfectly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 18:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conver-string-to-time-duration/m-p/93391#M24056</guid>
      <dc:creator>marquiselee</dc:creator>
      <dc:date>2013-10-11T18:22:34Z</dc:date>
    </item>
  </channel>
</rss>

