<?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 convert a time field in with the format D.HH:MM:SS to seconds? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270212#M81329</link>
    <description>&lt;P&gt;A null JobStepsExecutionDuration field will throw off the rest of the query.  This query should account for that.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=edw-jobstep source=rptdb01 (JobNameParent=DW_Load_USBrands OR JobNameParent=DW_Load_EUBrands OR JobNameParent=DW_Load_PostBrands)   |  dedup JobStepsLogId  | fillnull value="0:00:00:00" JobStepsExecutionDuration |  rex field=JobStepsExecutionDuration "(?&amp;lt;day&amp;gt;\d+):(?&amp;lt;hour&amp;gt;\d+):(?&amp;lt;min&amp;gt;\d+)'(?&amp;lt;sec&amp;gt;\d+)" | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec) | table JobStepsExecutionDuration execution_time_sec JobStepStart JobStepEndenter
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 May 2016 23:34:00 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-05-25T23:34:00Z</dc:date>
    <item>
      <title>How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270201#M81318</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have execution time in the format of &lt;CODE&gt;D:HH:DD:SS&lt;/CODE&gt; (0:00:00:22 ,0:00:00:55 ) that I need to convert to seconds. Any help is appreciated. &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270201#M81318</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T21:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270202#M81319</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/65240/converting-hours-minutesseconds-to-a-numerical-value.html"&gt;solution can be found here &lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270202#M81319</guid>
      <dc:creator>splunkton</dc:creator>
      <dc:date>2016-05-25T21:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270203#M81320</link>
      <description>&lt;P&gt;Here's one way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=execTime "(?&amp;lt;days&amp;gt;\d+):(?&amp;lt;hrs&amp;gt;\d+):(?&amp;lt;min&amp;gt;\d+):(?&amp;lt;sec&amp;gt;\d+)" | eval seconds = (days*86400) + (hrs*3600) + (min * 60) + sec | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 21:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270203#M81320</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-25T21:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270204#M81321</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex field=execution_time "(?&amp;lt;day&amp;gt;\d+):(?&amp;lt;hour&amp;gt;\d+):(?&amp;lt;min&amp;gt;\d+):(?&amp;lt;sec&amp;gt;\d+)"
 | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 21:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270204#M81321</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-25T21:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270205#M81322</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=edw-jobstep source=rptdb01 (JobNameParent=DW_Load_USBrands OR JobNameParent=DW_Load_EUBrands OR JobNameParent=DW_Load_PostBrands)   |  dedup JobStepsLogId  |  rex field=JobStepsExecutionDuration "(?\d+):(?\d+):(?\d+)'(?\d+)" | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec) | Table JobStepsExecutionDuration execution_time_sec JobStepStart JobStepEndenter 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;above is not working, I still see nulls. &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:42:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270205#M81322</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T21:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270206#M81323</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=edw-jobstep source=rptdb01 (JobNameParent=DW_Load_USBrands OR JobNameParent=DW_Load_EUBrands OR JobNameParent=DW_Load_PostBrands)   |  dedup JobStepsLogId  |  rex field=JobStepsExecutionDuration "(?\d+):(?\d+):(?\d+)'(?\d+)" | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec) | Table JobStepsExecutionDuration execution_time_sec JobStepStart JobStepEndenter 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;above is not working, I still see nulls. &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270206#M81323</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T21:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270207#M81324</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=edw-jobstep source=rptdb01 (JobNameParent=DW_Load_USBrands OR JobNameParent=DW_Load_EUBrands OR JobNameParent=DW_Load_PostBrands)   |  dedup JobStepsLogId  |  rex field=JobStepsExecutionDuration "(?\d+):(?\d+):(?\d+)'(?\d+)" | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec) | Table JobStepsExecutionDuration execution_time_sec JobStepStart JobStepEndenter 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;above is not working, I still see nulls. &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270207#M81324</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T21:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270208#M81325</link>
      <description>&lt;P&gt;Nulls for which field(s)?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270208#M81325</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-25T21:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270209#M81326</link>
      <description>&lt;P&gt;There was a typo in my regex. Fixed it just now. (so gle quotes instead of colon). @richgalloway answer should've worked fine.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:51:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270209#M81326</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-25T21:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270210#M81327</link>
      <description>&lt;P&gt;Thanks for query seems it is still not working &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 22:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270210#M81327</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T22:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270211#M81328</link>
      <description>&lt;P&gt;JobStepsExecutionDuration  can have nulls as time duration could be zero. &lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 22:29:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270211#M81328</guid>
      <dc:creator>vchitrala</dc:creator>
      <dc:date>2016-05-25T22:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a time field in with the format D.HH:MM:SS to seconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270212#M81329</link>
      <description>&lt;P&gt;A null JobStepsExecutionDuration field will throw off the rest of the query.  This query should account for that.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=edw-jobstep source=rptdb01 (JobNameParent=DW_Load_USBrands OR JobNameParent=DW_Load_EUBrands OR JobNameParent=DW_Load_PostBrands)   |  dedup JobStepsLogId  | fillnull value="0:00:00:00" JobStepsExecutionDuration |  rex field=JobStepsExecutionDuration "(?&amp;lt;day&amp;gt;\d+):(?&amp;lt;hour&amp;gt;\d+):(?&amp;lt;min&amp;gt;\d+)'(?&amp;lt;sec&amp;gt;\d+)" | eval execution_time_sec = ((day*86400)+(hour*3600)+(min*60)+sec) | table JobStepsExecutionDuration execution_time_sec JobStepStart JobStepEndenter
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 23:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-time-field-in-with-the-format-D-HH-MM-SS-to/m-p/270212#M81329</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-25T23:34:00Z</dc:date>
    </item>
  </channel>
</rss>

