<?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 do I extract 2 timestamps from the same line in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38304#M178716</link>
    <description>&lt;P&gt;That was great.  It lead me to this:&lt;BR /&gt;
source="startjob.log" |eval stime=strptime(start_timestamp,"%y/%m/%d.%H:%M:%S") |eval etime=strptime(end_timestamp,"%y/%m/%d.%H:%M:%S")| stats min(stime) as begin max(etime) as end by job_name| eval duration = end - begin| eval dur=duration|fieldformat duration=tostring(duration,"duration")| fields - stime etime&lt;BR /&gt;
| eval begin=strftime(begin,"%m/%d/%Y %H:%M:%S") | eval end=strftime(end,"%m/%d/%Y %H:%M:%S")&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:17:15 GMT</pubDate>
    <dc:creator>bsteph</dc:creator>
    <dc:date>2020-09-28T12:17:15Z</dc:date>
    <item>
      <title>How do I extract 2 timestamps from the same line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38302#M178714</link>
      <description>&lt;P&gt;I want to chart multiple jobs that start and end at different times by time period.  How do I extract the start and end time for a job and chart which jobs were running at a specified time.  In this example, I have multiple jobs starting in a 1 hour interval, but ending at different times the first timestamp is the jobs start time and the second is the jobs endtime:&lt;/P&gt;

&lt;P&gt;12/08/16.00:08:15  12/08/16.00:08:17   job1&lt;BR /&gt;
12/08/16.00:08:15  12/08/16.00:08:17   job2&lt;BR /&gt;
12/08/16.00:07:49  12/08/16.00:08:44   job3&lt;BR /&gt;
12/08/16.00:08:55  12/08/16.00:08:55   job4&lt;BR /&gt;
12/08/16.00:08:31  12/08/16.00:09:00   job5&lt;BR /&gt;
12/08/16.00:09:05  12/08/16.00:09:06   job6&lt;BR /&gt;
12/08/16.00:09:15  12/08/16.00:09:15   job7&lt;BR /&gt;
12/08/16.00:07:06  12/08/16.00:09:17   job8&lt;BR /&gt;
12/08/16.00:09:25  12/08/16.00:09:25   job9&lt;BR /&gt;
12/08/16.00:08:50  12/08/16.00:09:26   job10&lt;BR /&gt;
12/08/16.00:09:40  12/08/16.00:09:42  job11&lt;BR /&gt;
12/08/16.00:09:44  12/08/16.00:09:44  job 12&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 16:16:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38302#M178714</guid>
      <dc:creator>bsteph</dc:creator>
      <dc:date>2012-08-17T16:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract 2 timestamps from the same line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38303#M178715</link>
      <description>&lt;P&gt;Check out ...  &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/ConfigurePositionalTimestampExtraction"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/ConfigurePositionalTimestampExtraction&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
and ...  &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/Configuretimestamprecognition&lt;/A&gt;  &lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2012 16:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38303#M178715</guid>
      <dc:creator>rroberts</dc:creator>
      <dc:date>2012-08-17T16:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract 2 timestamps from the same line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38304#M178716</link>
      <description>&lt;P&gt;That was great.  It lead me to this:&lt;BR /&gt;
source="startjob.log" |eval stime=strptime(start_timestamp,"%y/%m/%d.%H:%M:%S") |eval etime=strptime(end_timestamp,"%y/%m/%d.%H:%M:%S")| stats min(stime) as begin max(etime) as end by job_name| eval duration = end - begin| eval dur=duration|fieldformat duration=tostring(duration,"duration")| fields - stime etime&lt;BR /&gt;
| eval begin=strftime(begin,"%m/%d/%Y %H:%M:%S") | eval end=strftime(end,"%m/%d/%Y %H:%M:%S")&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-2-timestamps-from-the-same-line/m-p/38304#M178716</guid>
      <dc:creator>bsteph</dc:creator>
      <dc:date>2020-09-28T12:17:15Z</dc:date>
    </item>
  </channel>
</rss>

