<?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 edit my search  to remove .000 from the end of a time field (HH:MM.000)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226626#M66836</link>
    <description>&lt;P&gt;Replace you search with what I had&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 15:24:50 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-11T15:24:50Z</dc:date>
    <item>
      <title>How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226621#M66831</link>
      <description>&lt;P&gt;I have a search that creates a time in &lt;CODE&gt;HH:MM&lt;/CODE&gt; and looks like &lt;CODE&gt;04:34.000&lt;/CODE&gt;.  How can I drop the &lt;CODE&gt;.000&lt;/CODE&gt; at the end of this?  Here is the part of my search that gets the time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| addinfo | eval duration=info_max_time-info_min_time | eval dur_formatted=tostring(duration, "duration") | eval HH:MM:SS=tostring('duration', "duration") | convert rmunit("duration") as numSecs  | eval "duration" = round('duration',0) | eval stringSecs2=tostring(numSecs,"duration") | eval "Total Time in HH:MM" = replace(stringSecs2,"(\d+)\:(\d+)\:(\d+)","\1:\2")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226621#M66831</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-11T15:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226622#M66832</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| addinfo | eval duration=info_max_time-info_min_time | eval dur_formatted=tostring(round(duration, 0), "duration") | table duration dur_formatted
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226622#M66832</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-11T15:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226623#M66833</link>
      <description>&lt;P&gt;You could use &lt;CODE&gt;rtrim&lt;/CODE&gt; to cut the last 3 digits &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;... | eval stringSecs2 = rtrim(stringSecs2,substr(stringSecs2,-3))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226623#M66833</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-11T15:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226624#M66834</link>
      <description>&lt;P&gt;That worked!  thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226624#M66834</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-11T15:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226625#M66835</link>
      <description>&lt;P&gt;I could not get that to work.  Were you say to replace what I had with that?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:22:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226625#M66835</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-11T15:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226626#M66836</link>
      <description>&lt;P&gt;Replace you search with what I had&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226626#M66836</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-11T15:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226627#M66837</link>
      <description>&lt;P&gt;Would this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval "Total Time in HH:MM"=strptime("Total Time in HH:MM", "%H:%M")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"strptime(X,Y)  This function takes a time represented by a string, X, and parses it into a timestamp using the format specified by Y. For a list and descriptions of format options, refer to the topic "Common time format variables".    If timeStr is in the form, "11:59", this returns it as a timestamp:"&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:26:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226627#M66837</guid>
      <dc:creator>JDukeSplunk</dc:creator>
      <dc:date>2016-08-11T15:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search  to remove .000 from the end of a time field (HH:MM.000)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226628#M66838</link>
      <description>&lt;P&gt;when I did that I get "no results found"&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 15:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-remove-000-from-the-end-of-a-time-field/m-p/226628#M66838</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-11T15:27:16Z</dc:date>
    </item>
  </channel>
</rss>

