<?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: Difference between the 2 time fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Difference-between-the-2-time-fields/m-p/675179#M113008</link>
    <description>&lt;P&gt;Find the difference between two timestamps by converting each into epoch (integer) format using the strptime function and then subtract them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval eStartTime=strptime('Start-Time', "%Y-%m-%dT%H:%M:%S.%6N%Z")
| eval eEndTime=strptime('End-Time', "%Y-%m-%dT%H:%M:%S.%6N%Z")&lt;/LI-CODE&gt;&lt;P&gt;P.S.&amp;nbsp; Avoid using hyphens in field names as they can be mis-interpreted as the subtraction operator.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 14:25:53 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-01-23T14:25:53Z</dc:date>
    <item>
      <title>Difference between the 2 time fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Difference-between-the-2-time-fields/m-p/675177#M113007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please let me know how i can find the difference between the 2 fields&amp;nbsp;Start-Time and&amp;nbsp;End-Time in the below search.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Format of time extracted by the query is :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start-Time =&amp;nbsp;&lt;SPAN&gt;2024-01-23T11:38:59.0000000Z&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;End-Time =&amp;nbsp;&lt;SPAN&gt;2024-01-23T11:39:03.0000000Z&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Query :&amp;nbsp;&lt;/P&gt;&lt;P&gt;`macro_events_prod_srt_shareholders_esa` eocEnv = PRO * "MICROSOFT.DATAFACTORY" activityName = Merge_Disclosure_Request 741b5db8-da47-468b-b883-a06ef137519a&lt;BR /&gt;| eval Dreqid=case('category'="PipelineRuns",'properties.Parameters.DisclosureRequestId','category'="ActivityRuns",'properties.Input.storedProcedureParameters.DisclosureRequestId.value',1=1,"")&lt;BR /&gt;| eval &lt;STRONG&gt;end_time&lt;/STRONG&gt;=case('end'="1601-01-01T00:00:00.0000000Z", "Still-Running",1=1,'end')&lt;BR /&gt;| table eocEnv , &lt;STRONG&gt;start , end_time&lt;/STRONG&gt; , pipelineName , activityName, pipelineRunId,level , status , category , Type , Dreqid, properties.Error.errorCode , properties.Error.message&lt;BR /&gt;| rename Dreqid as "Disclosure request id" , eocEnv as "Environment" , EOC_ResourceGroup as " Resource_Group" , activityName as "Activity Name" , pipelineName as "Pipeline Name" , operationName as "Operation Name" , pipelineRunId as "Run_Id" , level as "Level" , status as "STATUS" , category as "Category" , start as "Start-Time" , end_time as "End-Time" , properties.Error.errorCode as "Error-Code" , properties.Error.message as "Error-Message"&lt;BR /&gt;| sort -"Start-Time"&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="Real_captain_0-1706019257853.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29077i3401E1C5B0852DEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_0-1706019257853.png" alt="Real_captain_0-1706019257853.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 14:15:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Difference-between-the-2-time-fields/m-p/675177#M113007</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-01-23T14:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the 2 time fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Difference-between-the-2-time-fields/m-p/675179#M113008</link>
      <description>&lt;P&gt;Find the difference between two timestamps by converting each into epoch (integer) format using the strptime function and then subtract them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval eStartTime=strptime('Start-Time', "%Y-%m-%dT%H:%M:%S.%6N%Z")
| eval eEndTime=strptime('End-Time', "%Y-%m-%dT%H:%M:%S.%6N%Z")&lt;/LI-CODE&gt;&lt;P&gt;P.S.&amp;nbsp; Avoid using hyphens in field names as they can be mis-interpreted as the subtraction operator.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 14:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Difference-between-the-2-time-fields/m-p/675179#M113008</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-01-23T14:25:53Z</dc:date>
    </item>
  </channel>
</rss>

