<?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 How to filter out timestamp without miliseconds? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613452#M213205</link>
    <description>&lt;P&gt;We have 2 types of orders in the system, some are entered manually by phone and some are processed automatically as they are fed by other systems.&lt;BR /&gt;The way I can differentiate is by the order timestamps:&lt;BR /&gt;Phone orders do not contain miliseconds in the order timestamp (&lt;SPAN&gt;2022-09-16T17:07:41Z&lt;/SPAN&gt;)&lt;BR /&gt;Orders filled automatically by other systems contain miliseconds (&lt;SPAN&gt;2022-09-16T16:22:28.573Z&lt;/SPAN&gt;)&lt;BR /&gt;I am calculating the processing delays on these orders but I want to display the results on 2 rows:&lt;BR /&gt;1. Phone orders max delays&lt;BR /&gt;2. System orders max delays&lt;/P&gt;
&lt;P&gt;Here is what I am using now:&lt;BR /&gt;MySearch&amp;nbsp; | rex field=_raw "(?ms)^(?:[^ \\n]* ){9}\"(?P&amp;lt;TradeDateTS&amp;gt;[^\"]+)" offset_field=_extracted_fields_bounds | rex field=_raw "^(?:[^ \\n]* ){7}\"(?P&amp;lt;StoreTS&amp;gt;[^\"]+)" offset_field=_extracted_fields_bounds0 | eval Delay = (strptime(StoreTS, "%Y-%m-%dT%H:%M:%S.%N"))-(strptime(TradeDateTS, "%Y-%m-%dT%H:%M:%S.%N"))&lt;BR /&gt;| stats max(Delay)&lt;/P&gt;
&lt;P&gt;Note: the goal is not to add or remove the miliseconds information&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 17:52:29 GMT</pubDate>
    <dc:creator>DPOIRE</dc:creator>
    <dc:date>2022-09-16T17:52:29Z</dc:date>
    <item>
      <title>How to filter out timestamp without miliseconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613452#M213205</link>
      <description>&lt;P&gt;We have 2 types of orders in the system, some are entered manually by phone and some are processed automatically as they are fed by other systems.&lt;BR /&gt;The way I can differentiate is by the order timestamps:&lt;BR /&gt;Phone orders do not contain miliseconds in the order timestamp (&lt;SPAN&gt;2022-09-16T17:07:41Z&lt;/SPAN&gt;)&lt;BR /&gt;Orders filled automatically by other systems contain miliseconds (&lt;SPAN&gt;2022-09-16T16:22:28.573Z&lt;/SPAN&gt;)&lt;BR /&gt;I am calculating the processing delays on these orders but I want to display the results on 2 rows:&lt;BR /&gt;1. Phone orders max delays&lt;BR /&gt;2. System orders max delays&lt;/P&gt;
&lt;P&gt;Here is what I am using now:&lt;BR /&gt;MySearch&amp;nbsp; | rex field=_raw "(?ms)^(?:[^ \\n]* ){9}\"(?P&amp;lt;TradeDateTS&amp;gt;[^\"]+)" offset_field=_extracted_fields_bounds | rex field=_raw "^(?:[^ \\n]* ){7}\"(?P&amp;lt;StoreTS&amp;gt;[^\"]+)" offset_field=_extracted_fields_bounds0 | eval Delay = (strptime(StoreTS, "%Y-%m-%dT%H:%M:%S.%N"))-(strptime(TradeDateTS, "%Y-%m-%dT%H:%M:%S.%N"))&lt;BR /&gt;| stats max(Delay)&lt;/P&gt;
&lt;P&gt;Note: the goal is not to add or remove the miliseconds information&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613452#M213205</guid>
      <dc:creator>DPOIRE</dc:creator>
      <dc:date>2022-09-16T17:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out timestamp without miliseconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613456#M213208</link>
      <description>&lt;P&gt;Differentiating the timestamps is just a matter of looking for those with a "." in them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MySearch  | rex field=_raw "(?ms)^(?:[^ \\n]* ){9}\"(?P&amp;lt;TradeDateTS&amp;gt;[^\"]+)" 
| rex field=_raw "^(?:[^ \\n]* ){7}\"(?P&amp;lt;StoreTS&amp;gt;[^\"]+)" 
| eval Delay = (strptime(StoreTS, "%Y-%m-%dT%H:%M:%S.%N"))-(strptime(TradeDateTS, "%Y-%m-%dT%H:%M:%S.%N"))
| eval orderType=if(match(TradeDateTS, "\."), "auto", "phone")
| stats max(Delay) by orderType&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613456#M213208</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-09-16T17:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out timestamp without miliseconds?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613464#M213214</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 18:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-timestamp-without-miliseconds/m-p/613464#M213214</guid>
      <dc:creator>DPOIRE</dc:creator>
      <dc:date>2022-09-16T18:59:43Z</dc:date>
    </item>
  </channel>
</rss>

