<?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 add a lapsed time to a field's timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575203#M200435</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my bad for the confusion, I am temporary away from my work station and don’t have the actual code at the moment&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Y can take upto 24 hours to show up after x - making it null until the 24 hours complete.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so I was thinking I could include a lapse of time of 24 hours after x took place.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 07:21:07 GMT</pubDate>
    <dc:creator>MeMilo09</dc:creator>
    <dc:date>2021-11-17T07:21:07Z</dc:date>
    <item>
      <title>How to add a lapsed time to a field's timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575198#M200432</link>
      <description>&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;Been researching on how to give time for the next sequential event to occur, but have not found a way. Lets say field X occurred and the next event to take place is field Y, but field Y is null&amp;nbsp; if under 24 hrs give Length_of_Time in min once Y happens.&lt;BR /&gt;&lt;BR /&gt;Issue is if its the same day and Y still has not occurred following X -- , give X 24 hours to happen from the time field Y&amp;nbsp; happened before marking it as failure of error... So far this is what I have...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|  eval X = strptime(StartTime,"%Y-%m-%d %H:%M:%S.%q"),
 Y =strptime(EndTime,"%Y-%m-%d %H:%M:%S.%6N")

note: 86400 is 24 hrs in seconds 

| eval Length_of_Time = if(isNull(Y)AND Y-X &amp;lt; 86400 AND 86400&amp;lt;=X,round((X-Y)/60,0))&lt;/LI-CODE&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>Wed, 17 Nov 2021 04:54:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575198#M200432</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-11-17T04:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a lapsed time to a field's timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575200#M200434</link>
      <description>&lt;P&gt;It is unclear to me what you are trying to achieve here - if Y is null, what are you expecting from any further calculations involving Y? Assuming StartTime is a timestamp field, X will probably always be greater than 86400. Assuming you do have actual datetimes in X and Y, the description would suggest that Y occurs after X, so X-Y will be negative.&lt;/P&gt;&lt;P&gt;Please can you clarify, perhaps with some real examples of the event you are dealing with?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 06:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575200#M200434</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-17T06:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a lapsed time to a field's timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575203#M200435</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my bad for the confusion, I am temporary away from my work station and don’t have the actual code at the moment&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Y can take upto 24 hours to show up after x - making it null until the 24 hours complete.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so I was thinking I could include a lapse of time of 24 hours after x took place.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 07:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-lapsed-time-to-a-field-s-timestamp/m-p/575203#M200435</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-11-17T07:21:07Z</dc:date>
    </item>
  </channel>
</rss>

