<?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: Calculate a date field using the field calculator in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718712#M3132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/165942"&gt;Christine Wiltawsky&lt;/A&gt;​​ - Yes, I just verified using a system configured with 10.4 Patch1.&lt;/P&gt;&lt;P&gt;Note that I've chosen to blur irrelevant property values since, in my example, I'm writing to an existing field of type Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/210896_Capture.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2016 21:33:34 GMT</pubDate>
    <dc:creator>RJSunderman</dc:creator>
    <dc:date>2016-07-06T21:33:34Z</dc:date>
    <item>
      <title>Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718704#M3124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the field calculator as part of a GeoEvent Service.&amp;nbsp; I wish to poll a FS for input and use the field calculator to populate a date field on its way to the add feature output connector.&amp;nbsp; I can't find documentation on what expression to use to populate the field.&amp;nbsp; Any ideas?&amp;nbsp; I found $ReceivedTime though this does not seem to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 16:55:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718704#M3124</guid>
      <dc:creator>DavidCrosby</dc:creator>
      <dc:date>2014-05-15T16:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718705#M3125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hey David -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think the GeoEvent property you want to use is $RECEIVED_TIME ... not $ReceivedTime.&amp;nbsp; &lt;S&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;If you specify&lt;SPAN class="apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; font-family: 'Helvetica',sans-serif; font-style: italic;"&gt;$RECEIVED_TIME&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN class="apple-converted-space"&gt; as the&lt;SPAN class="apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM style="font-style: italic;"&gt;Field Calculator&lt;/EM&gt;&lt;SPAN class="apple-converted-space"&gt; expression, you should be able to time stamp each GeoEvent received&lt;/SPAN&gt;&lt;/S&gt;&lt;/SPAN&gt;&lt;SPAN&gt; from the &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;Poll an ArcGIS Server for Features&lt;/SPAN&gt;&lt;SPAN&gt; inbound connector with the server's current date/time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #c00000; background: white;"&gt;Correction:&amp;nbsp; When using a &lt;EM&gt;Field Calculator&lt;/EM&gt; you need to use the functions &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif; background: white;"&gt;receivedTime()&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #c00000; background: white;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif; background: white;"&gt;currentTime()&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #c00000; background: white;"&gt; as Vlad indicates below. Apologies for the misdirection.&amp;nbsp; - RJ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know that these "macros" are well documented ... the easiest way I know to find them is to review the list presented when configuring a filter expression. That dialog includes the attribute fields of known GeoEvent Definitions, known event field tags, and the GeoEvent property values (e.g. "macros") you can use in expressions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[ATTACH=CONFIG]33899[/ATTACH]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- RJ&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 15:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718705#M3125</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2014-05-19T15:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718706#M3126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also curious about how to calculate the date using the field calculator. Does anyone have a suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a new feature to a feature service in arcMap and would like to calculate the date. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 18:30:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718706#M3126</guid>
      <dc:creator>StephanieKiefer</dc:creator>
      <dc:date>2014-07-13T18:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718707#M3127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a literal date value in VB Script you can type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#12/31/2013#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateSerial(2013, 12, 31)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Python you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="go" style="color: #303030;"&gt;datetime.date(2013, 12, 31)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 21:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718707#M3127</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-07-13T21:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718708#M3128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Calculator processor currently supports two functions that you can use:&lt;/P&gt;&lt;P&gt;1) receivedTime() - returns time stamp that was attached to GeoEvent by the GeoEvent Processor when it was received;&lt;/P&gt;&lt;P&gt;2) currentTime() - generates new time stamp at the moment when Field Calculator evaluates an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance if you want to calculate the time delay between the point in time when geoevent was received and point in time when geovent was processed by Field Calculator you can write an expression like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentTime() - receivedTime()&lt;/P&gt;&lt;P&gt;This will return a number of milliseconds in between the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 18:07:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718708#M3128</guid>
      <dc:creator>VladislavPlechnoy</dc:creator>
      <dc:date>2014-07-15T18:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718709#M3129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realized a comparison between a date I had with the variable $RECEIVED_TIME but did not work properly. What am I doing wrong?&lt;IMG alt="date.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/47415_date.png" style="width: 620px; height: 80px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 13:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718709#M3129</guid>
      <dc:creator>RafaelDetoni</dc:creator>
      <dc:date>2015-01-05T13:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718710#M3130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rafael - sorry for the delay in responding to your post to the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some limits with how a Filter is able to parse a string representation of a date/time in order to evaluate a less-than / greater-than expression. Combining a date value and a time value together is not working. For example, instead of doing something like &lt;STRONG&gt;TIME_START = 3/16/2012 02:25:31 PM&lt;/STRONG&gt; you need to write separate expressions for the date and time and then combine them using logical operators (AND, OR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, you cannot do this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/66957_Capture.png" style="width: 620px; height: 127px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/66958_Capture2.png" style="width: 620px; height: 99px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you might try working with the date/time values as long integers representing Epoch millisecond values. I know that within a &lt;EM&gt;Field Calculator&lt;/EM&gt; you can perform simple arithmetic on a date/time to add, for example, an hour's worth of milliseconds to a value:&amp;nbsp; &lt;STRONG&gt;TIME_START + (60 * 60 * 1000)&lt;/STRONG&gt;. I'm not sure without conducting some experiments how a &lt;EM&gt;Filter&lt;/EM&gt; will interpret an expression such as:&amp;nbsp; &lt;STRONG&gt;TIME_START &amp;gt;= 1331864731000&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information is of some help -&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 19:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718710#M3130</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2015-03-02T19:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718711#M3131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this answer still up-to-date? receivedTime() and currentTime() are not working for me in FieldCalculator. I'm using GeoEvent Extension 10.4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718711#M3131</guid>
      <dc:creator>ChristineWiltawsky</dc:creator>
      <dc:date>2016-06-23T07:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718712#M3132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/165942"&gt;Christine Wiltawsky&lt;/A&gt;​​ - Yes, I just verified using a system configured with 10.4 Patch1.&lt;/P&gt;&lt;P&gt;Note that I've chosen to blur irrelevant property values since, in my example, I'm writing to an existing field of type Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/210896_Capture.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 21:33:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718712#M3132</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2016-07-06T21:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a date field using the field calculator</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718713#M3133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was struggling with this in 10.3.1. The fix was to use a date field type.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/calculate-a-date-field-using-the-field-calculator/m-p/718713#M3133</guid>
      <dc:creator>NathanKemphues</dc:creator>
      <dc:date>2019-03-22T17:46:32Z</dc:date>
    </item>
  </channel>
</rss>

