<?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 Filter out Time Anomalies in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/filter-out-time-anomalies/m-p/361227#M1514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the Sierra Wireless GX440 and the RAP adaptor to track vehicles.&amp;nbsp; Sometimes I'm receiving events with an odd date/time stamp of 11/30/1999 with varying times.&amp;nbsp; I also receive date/time stamps of 11/30/2099 with varying times.&amp;nbsp; I've tried filtering out these anomalies a couple different ways with no success.&amp;nbsp; For example using Epoch milliseconds "TimeStamp &amp;gt;= 1448034146471" (11/20/2015 15:42:26) and "TimeStamp &amp;lt;= 4099698000000" (11/30/2099).&amp;nbsp; Using that method no events come through.&amp;nbsp; I've also tried "TimeStamp &amp;gt;= 2015y 11M 19d" with no success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to filter these odd dates out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2015 15:51:34 GMT</pubDate>
    <dc:creator>StevenBirney1</dc:creator>
    <dc:date>2015-11-20T15:51:34Z</dc:date>
    <item>
      <title>Filter out Time Anomalies</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/filter-out-time-anomalies/m-p/361227#M1514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the Sierra Wireless GX440 and the RAP adaptor to track vehicles.&amp;nbsp; Sometimes I'm receiving events with an odd date/time stamp of 11/30/1999 with varying times.&amp;nbsp; I also receive date/time stamps of 11/30/2099 with varying times.&amp;nbsp; I've tried filtering out these anomalies a couple different ways with no success.&amp;nbsp; For example using Epoch milliseconds "TimeStamp &amp;gt;= 1448034146471" (11/20/2015 15:42:26) and "TimeStamp &amp;lt;= 4099698000000" (11/30/2099).&amp;nbsp; Using that method no events come through.&amp;nbsp; I've also tried "TimeStamp &amp;gt;= 2015y 11M 19d" with no success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to filter these odd dates out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 15:51:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/filter-out-time-anomalies/m-p/361227#M1514</guid>
      <dc:creator>StevenBirney1</dc:creator>
      <dc:date>2015-11-20T15:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter out Time Anomalies</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/filter-out-time-anomalies/m-p/361228#M1515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Steven -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My apologies that your question went so long without an answer or reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a Sierra Wireless setup I can use to truly replicate your workflow, but I can assume a data provider is sending invalid date/time values and choose another way of ingesting the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I configured a '&lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana',sans-serif; color: gray; background: white;"&gt;Receive JSON on a REST Endpoint&lt;/SPAN&gt;' and sent the following three records into a GeoEvent Service&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Verdana',sans-serif; color: #0070c0; background: white;"&gt;[&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Verdana',sans-serif; color: #0070c0; background: white;"&gt; {"TrackID":"AA-1234", "DT":"11/30/1999 12:34:56"},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Verdana',sans-serif; color: #0070c0; background: white;"&gt; {"TrackID":"BB-3456", "DT":"01/22/2016 12:34:56"},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Verdana',sans-serif; color: #0070c0; background: white;"&gt; {"TrackID":"CC-5678", "DT":"11/30/2099 12:34:56"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Verdana',sans-serif; color: #0070c0; background: white;"&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date/time values are received as string values, but I made sure my GeoEvent Definition specifies that the attribute values be handled as Date. I used a stream stream service to broadcast the unfiltered output so that I could see the epoch milliseconds value GeoEvent was handling:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f7f7f; font-size: 9.0pt; font-family: 'Verdana',sans-serif;"&gt;{"attributes":{"TrackID":"CC-5678","DT":4099754096000}}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana',sans-serif; color: #7f7f7f;"&gt;&lt;BR /&gt;&lt;SPAN class="text"&gt;{"attributes":{"TrackID":"AA-1234","DT":943994096000}}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text"&gt;{"attributes":{"TrackID":"BB-3456","DT":1453494896000}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been told that attempting to configure a Filter with any of the following expressions will not work:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" height="81" style="border: none; height: 81px; width: 707px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="252"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;DT &amp;gt;= ${EffectiveFrom}&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="414"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Comparing an event attribute against another field of type Date&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="252"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;DT &amp;gt;= 2/15/2015 13:26:45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="414"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Comparing an event attribute against a String literal&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="252"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;TIME_START &amp;lt;= ${MyEventTime}&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="414"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Using a GeoTag to identify a field to compare against another field&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But using the date/time algebra you tried (e.g. &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;TimeStamp &amp;gt;= 2015y 11M 19d&lt;/SPAN&gt;) should have worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested the following expression in a simple Filter element:&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 12px;"&gt;DT &amp;gt;= 2010y 01M 01d &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That expression successfully filtered/removed the invalid '1999' value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I changed my filter to have two expressions (with a logical AND):&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 12px;"&gt;DT &amp;gt;= 2010y 01M 01d&lt;/SPAN&gt; &lt;SPAN style="font-size: 8pt;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; font-size: 12px;"&gt;DT &amp;lt;= 2030y 01M 01d&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;both invalid dates were filter/removed. Only the event with the TrackID "BB-3456" passed through to my stream service output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to check your GeoEvent Definition to make sure that your TimeStamp field is being handled as a Date. You could also use a File/JSON output or a stream service output to confirm the date/time value associated with the events you are receiving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I confirmed that a Filter element's expression &lt;EM&gt;&lt;STRONG&gt;will not&lt;/STRONG&gt;&lt;/EM&gt; accept a literal integer value representing epoch milliseconds. A Field Calculator processor performs implicit data type conversions as part of its expression evaluation (which is why we can add/subtract some number of milliseconds from a Date value) ... but a Filter is limited to the date/time algebra I used above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The product team has an issue open in the product backlog ("&lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana',sans-serif; color: gray; background: white;"&gt;The date format does not work on filter in GeoEvent Services - Issue #581&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;"). If applying filters to date/time values continues to be an issue for you and the date/time algebra is not a workable solution, please submit an incident with Esri Technical Support and request the incident be escalated and linked to the existing issue in the product team's backlog.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Hope this information was helpful -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;RJ&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #FFF2CC; font-size: 9.0pt; line-height: 1.5;"&gt;See Also:&amp;nbsp; &lt;A href="https://community.esri.com/migration-blogpost/2881"&gt;How to Create Temporal Filter in GeoEvent&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 23:41:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/filter-out-time-anomalies/m-p/361228#M1515</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2016-01-22T23:41:35Z</dc:date>
    </item>
  </channel>
</rss>

