<?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: Start time calculate for each transaction? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632446#M219697</link>
    <description>&lt;P&gt;This is one event .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1677539899294.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24071i89AD826D89043B0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1677539899294.png" alt="xp001975_0-1677539899294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;want to calculate the start time by deducting time to serve request (millisec) from _time .&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2023 23:19:17 GMT</pubDate>
    <dc:creator>xp001975</dc:creator>
    <dc:date>2023-02-27T23:19:17Z</dc:date>
    <item>
      <title>How to start time calculation for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632385#M219676</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;I have a splunk log where we have End time and time to Serve Requst (in Millisec).&lt;BR /&gt;i want calculate Start time by subtracting End time -&amp;nbsp;time to Serve Requst (in Millisec) . Can you please help me with the query which will help me to achieve this requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;End time -&lt;SPAN&gt;2023-02-27 10:46:13.559&lt;/SPAN&gt;&lt;BR /&gt;time to server Request -&amp;nbsp;&lt;SPAN&gt;1131 (milliSec)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 23:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632385#M219676</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-27T23:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632432#M219693</link>
      <description>&lt;P&gt;Is that one event or two?&amp;nbsp; If two, then what field(s) connect them to a transaction?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 22:23:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632432#M219693</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-27T22:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632438#M219695</link>
      <description>&lt;P&gt;Assuming those are your field names, here is an example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval "End time"="2023-02-27 10:46:13.559"
| eval "time to server Request" = 1131
| eval end_time=strptime('End time', "%F %T.%Q")
| eval start_time=end_time-('time to server Request'/1000)
| eval StartTime=strftime(start_time, "%F %T.%Q")&lt;/LI-CODE&gt;&lt;P&gt;so just parse the time with strptime() and then subtract milliseconds /1000 from the end time to get start time&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 22:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632438#M219695</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-02-27T22:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632443#M219696</link>
      <description>&lt;P&gt;I am trying&amp;nbsp; | eval EndTime = strptime(_time, "%Y-%m-%d %H:%M:%S.%3N%Z") | eval timetoserveRequst = strptime(time_to_serve_request, ".%3N%Z") | eval startTIme = EndTime - timetoserveRequst&lt;BR /&gt;| table startTIme EndTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Nothing is getting displayed&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1677538385308.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24070i8265A4045FC9545F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1677538385308.png" alt="xp001975_0-1677538385308.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 22:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632443#M219696</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-27T22:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632446#M219697</link>
      <description>&lt;P&gt;This is one event .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1677539899294.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24071i89AD826D89043B0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1677539899294.png" alt="xp001975_0-1677539899294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;want to calculate the start time by deducting time to serve request (millisec) from _time .&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 23:19:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632446#M219697</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-27T23:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632448#M219698</link>
      <description>&lt;P&gt;i tried but nothing is coming in the output&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1677540985717.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24072i6F3AB2FF0DACAC46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1677540985717.png" alt="xp001975_0-1677540985717.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 23:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632448#M219698</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-27T23:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632450#M219699</link>
      <description>&lt;P&gt;_time is already in epoch, so if your 'end time' is actually the _time field, just subtract the millseconds / 1000&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 00:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632450#M219699</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-02-28T00:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632473#M219708</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1677558311321.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24074iFB9545444C76F5AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1677558311321.png" alt="xp001975_0-1677558311321.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Still no luck&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 04:25:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632473#M219708</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-28T04:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632490#M219712</link>
      <description>&lt;P&gt;Please add the time_to_serve_request in the table.&lt;/P&gt;&lt;P&gt;Generally if a field is blank it means that its dependencies are not what you expect them to be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 07:12:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632490#M219712</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-02-28T07:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632638#M219776</link>
      <description>&lt;P&gt;Do you have any help here ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 19:13:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632638#M219776</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-28T19:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632639#M219777</link>
      <description>&lt;P&gt;Do you have any query to help ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 19:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632639#M219777</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-02-28T19:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632641#M219778</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval starttime=_time-(time_to_serve_request/1000)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Feb 2023 19:17:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632641#M219778</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-28T19:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632668#M219792</link>
      <description>&lt;P&gt;If you have a field called time_to_serve_request in your data and it has a numeric value, then the eval statement should work.&lt;/P&gt;&lt;P&gt;Please add&amp;nbsp;time_to_serve_request in your table statement and post here the screenshot.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632668#M219792</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-02-28T22:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632704#M219800</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_1-1677646966092.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24119i3AB0BC7F294B9299/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_1-1677646966092.png" alt="xp001975_1-1677646966092.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Start time is not coming in YYYY-MM-DD HH:MM:SS.millisec format&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 05:04:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632704#M219800</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-01T05:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Start time calculate for each transaction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632714#M219801</link>
      <description>&lt;P&gt;Epoch times are in seconds, so if you want to display those as localised text based dates, you need to convert them. The _time field is different in that it IS epoch, but it is always shown in a text form.&lt;/P&gt;&lt;P&gt;To convert the start time to a text form use strftime&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval starttime=strftime(_time-(time_to_serve_request/1000), "%F %T.%Q")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 06:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-time-calculation-for-each-transaction/m-p/632714#M219801</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-03-01T06:53:10Z</dc:date>
    </item>
  </channel>
</rss>

