<?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: Adding seconds to _time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72369#M18095</link>
    <description>&lt;P&gt;if it is 200 seconds then resulted output time should also have minutes modified&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2013 08:55:38 GMT</pubDate>
    <dc:creator>ChhayaV</dc:creator>
    <dc:date>2013-09-25T08:55:38Z</dc:date>
    <item>
      <title>Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72367#M18093</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;I want to add some seconds in the current _time.&lt;BR /&gt;
Is there any build in function for it?&lt;/P&gt;

&lt;P&gt;e.g_time=23:03:39.022&lt;BR /&gt;
after adding 4.90 seocnds it should be 23:03:43.936&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 08:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72367#M18093</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-25T08:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72368#M18094</link>
      <description>&lt;P&gt;&lt;CODE&gt;_time&lt;/CODE&gt; is actually in epoch format, Splunk just converts the format automatically before showing it to you so that it's human readable. So, to add 4 seconds, just do &lt;CODE&gt;eval _time=_time+4&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Note that this is purely a search-time operation - if you want to do this at index-time the problem is much more complex because functions for performing arithmetic etc are not available.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 08:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72368#M18094</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-25T08:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72369#M18095</link>
      <description>&lt;P&gt;if it is 200 seconds then resulted output time should also have minutes modified&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 08:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72369#M18095</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-25T08:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72370#M18096</link>
      <description>&lt;P&gt;Yup. Epoch is just seconds, so add how many seconds you want.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 08:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72370#M18096</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-25T08:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72371#M18097</link>
      <description>&lt;P&gt;got it ..but i am not able to see milliseconds &lt;/P&gt;

&lt;P&gt;index=tm_idx host="server" index=tm_idx host="server" "finished executing normally" | rex field=_raw "(?i)Process\s(\"|\"})(?&lt;PROCESSNAME&gt;\w+)" | rex field=_raw "elapsed\stime\s(?&lt;MYDURATION&gt;\w+.\w+)\sseconds"  | eval time=_time-myduration|  convert timeformat="%m/%d/%Y %H:%M:%S" ctime(time) as timestr |table _time timestr _raw myduration&lt;/MYDURATION&gt;&lt;/PROCESSNAME&gt;&lt;/P&gt;

&lt;P&gt;this is my search&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72371#M18097</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2020-09-28T14:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72372#M18098</link>
      <description>&lt;P&gt;Explain more clearly. What do you mean by not being able to see milliseconds? What are you expecting to see, and what are you not seeing?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 11:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72372#M18098</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-25T11:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72373#M18099</link>
      <description>&lt;P&gt;Your time format output truncates to seconds. You'll need to add some placeholder in the format string for milli / microseconds.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2013 13:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72373#M18099</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-25T13:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72374#M18100</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
input time: 23:03:43.936&lt;BR /&gt;
after subtracting 4.09&lt;BR /&gt;
expected output time: 23:03:39.022&lt;/P&gt;

&lt;P&gt;but output time is 23:03:39&lt;/P&gt;

&lt;P&gt;i gave %ms after %S but not working and when i export it to CSV time column is not proper it show ### in the column&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 04:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72374#M18100</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-26T04:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72375#M18101</link>
      <description>&lt;P&gt;shouldn't the expected outcome be 23:03:39.846 ?&lt;/P&gt;

&lt;P&gt;and for &lt;CODE&gt;strftime/strptime, %3N, %6N&lt;/CODE&gt; are the variables for milli- and microseconds, respectively.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.5/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.5/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 05:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72375#M18101</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-09-26T05:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72376#M18102</link>
      <description>&lt;P&gt;already tried&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 08:34:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72376#M18102</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-26T08:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding seconds to _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72377#M18103</link>
      <description>&lt;P&gt;This works, and gives milliseconds:&lt;/P&gt;

&lt;P&gt;convert timeformat="%Y/%m/%d %H:%M:%S.%3N" ctime(_time) AS timestr&lt;/P&gt;

&lt;P&gt;What did you try that didn't work?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:03:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-seconds-to-time/m-p/72377#M18103</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-26T13:03:02Z</dc:date>
    </item>
  </channel>
</rss>

