<?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 convert a time duration to a number? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/613873#M213334</link>
    <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I have a field which has the values in the below string format:&amp;nbsp; HH:MM:SS.&lt;SPAN&gt;3N&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;0:00:43.096&lt;/P&gt;
&lt;P class=""&gt;22:09:50.174&lt;/P&gt;
&lt;P class=""&gt;1:59:54.382&lt;/P&gt;
&lt;P class=""&gt;5:41:21.623&lt;/P&gt;
&lt;P class=""&gt;0:01:56.597&lt;BR /&gt;&lt;BR /&gt;I want to convert the whole duration into minutes and anything under a min is considered 1 minute&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 14:09:59 GMT</pubDate>
    <dc:creator>kranthimutyala</dc:creator>
    <dc:date>2022-09-21T14:09:59Z</dc:date>
    <item>
      <title>How do I convert a time duration to a number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/613873#M213334</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I have a field which has the values in the below string format:&amp;nbsp; HH:MM:SS.&lt;SPAN&gt;3N&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;0:00:43.096&lt;/P&gt;
&lt;P class=""&gt;22:09:50.174&lt;/P&gt;
&lt;P class=""&gt;1:59:54.382&lt;/P&gt;
&lt;P class=""&gt;5:41:21.623&lt;/P&gt;
&lt;P class=""&gt;0:01:56.597&lt;BR /&gt;&lt;BR /&gt;I want to convert the whole duration into minutes and anything under a min is considered 1 minute&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 14:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/613873#M213334</guid>
      <dc:creator>kranthimutyala</dc:creator>
      <dc:date>2022-09-21T14:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a time duration to a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/613877#M213335</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/177801"&gt;@kranthimutyala&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to extract the hours value using a regex and then use an eval, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=your_duration "^(?&amp;lt;hours&amp;gt;\d+):(?&amp;lt;minutes&amp;gt;\d+):(?&amp;lt;seconds&amp;gt;\d+)\.(?&amp;lt;milliseconds&amp;gt;\d+)"
| eval duration_in_minutes=hours*60+minutes+if(seconds&amp;gt;0 OR milliseconds&amp;gt;0,1,0)
| table duration_in_minutes &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 06:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/613877#M213335</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-21T06:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a time duration to a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/614131#M213425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/177801"&gt;@kranthimutyala&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 13:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/614131#M213425</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-22T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a time duration to a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/614294#M213453</link>
      <description>&lt;P&gt;Karma and given, one more question from my end which can earn you more&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-JSON-fields/m-p/614290#M213452" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-JSON-fields/m-p/614290#M213452&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 12:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-convert-a-time-duration-to-a-number/m-p/614294#M213453</guid>
      <dc:creator>kranthimutyala</dc:creator>
      <dc:date>2022-09-23T12:20:26Z</dc:date>
    </item>
  </channel>
</rss>

