<?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: Formatting the date in the MessageFormatter adapter (outbound) in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397739#M1698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi G Tiemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the Field Calculator to convert input timestamps into local time, but I haven't tried converting dates with the month names in them. There are some helpful tips on this post that will help get you started,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/104898"&gt;Converting between Date Formats&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your process flow may have to ingest the date field into an output feature service that can return a numeric date back into GEP, once the date is back in GEP your Field Calculator can parse the numeric value into the format you are expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting date format&amp;nbsp; '&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;DDMMYY &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;hhmmss' &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'YYYY-MM-DDThh:mm:ssZ' use,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'20' + substring(input_date,4,6)+ '-' + substring(input_date,2,4) + '-' + substring(input_date,0,2) + 'T' + substring(input_date,0,2) + ':' + substring(input_date,2,4) + ':' + substring(input_date,4,6) + 'Z'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 23:13:01 GMT</pubDate>
    <dc:creator>KDeVogelaere</dc:creator>
    <dc:date>2015-05-21T23:13:01Z</dc:date>
    <item>
      <title>Formatting the date in the MessageFormatter adapter (outbound)</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397738#M1697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an incoming event through the FeatureService input. 2 Fields are marked as Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I format these dates into the right format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TCP-out displays the date formatted like this:&lt;/P&gt;&lt;P&gt;Wed Sep 10 16:16:57 CEST 2014&lt;/P&gt;&lt;P&gt;MessageFormatter displays the date formatted the same way this (just another date/time);&lt;/P&gt;&lt;P&gt;Tue Sep 09 16:08:35 CEST 2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have this format:&lt;/P&gt;&lt;P&gt;2014-09-10 14:07:42&lt;/P&gt;&lt;P&gt;With the SimpleDateFormatter, it would be this format:&lt;/P&gt;&lt;P&gt;"yyyy-MM-dd HH:mm:ss"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I use a Calculate Field processor to format the field to a string field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 15:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397738#M1697</guid>
      <dc:creator>GTiemens</dc:creator>
      <dc:date>2014-09-10T15:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the date in the MessageFormatter adapter (outbound)</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397739#M1698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi G Tiemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the Field Calculator to convert input timestamps into local time, but I haven't tried converting dates with the month names in them. There are some helpful tips on this post that will help get you started,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/104898"&gt;Converting between Date Formats&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your process flow may have to ingest the date field into an output feature service that can return a numeric date back into GEP, once the date is back in GEP your Field Calculator can parse the numeric value into the format you are expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting date format&amp;nbsp; '&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;DDMMYY &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;hhmmss' &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'YYYY-MM-DDThh:mm:ssZ' use,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'20' + substring(input_date,4,6)+ '-' + substring(input_date,2,4) + '-' + substring(input_date,0,2) + 'T' + substring(input_date,0,2) + ':' + substring(input_date,2,4) + ':' + substring(input_date,4,6) + 'Z'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 23:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397739#M1698</guid>
      <dc:creator>KDeVogelaere</dc:creator>
      <dc:date>2015-05-21T23:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the date in the MessageFormatter adapter (outbound)</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397740#M1699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prior to the 10.3 release, if you wanted to output a custom string representation of a date/time value, you would have to follow a process like K DeVogelaere suggests above. Polling event data from a feature service for input, as G Tiemans indicates, and bringing the date/time values into GeoEvent using the Date data type prevents you from later obtaining the days / months / years or hours / minutes / seconds values from the Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeoEvent does not provide an interface like you might find in Java (illustrated below) to pull discrete values out of a Date:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="102302" alt="Capture1.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/102302_Capture1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Thus, you would have to broadcast the Date value out a GeoEvent output and re-ingest it as a String in order to use the substring() function supported by the Field Calculator processor for string manipulation. You cannot bring the date/time in from the feature service as a String because the feature service's JSON represents the date/time as a long integer in epoch milliseconds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 00:42:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397740#M1699</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2015-05-22T00:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the date in the MessageFormatter adapter (outbound)</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397741#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beginning with the 10.3 product release you have some additional options available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enhancements to the Text adapter -- used by the 'Push Text to an External TCP Socket' and 'Write to a CSV File' out-of-the-box connectors -- allow you to specify that you want a custom String representation of a Date:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="102314" alt="Capture1.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/102314_Capture1.png" style="width: 620px; height: 188px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The configuration is usually found beneath the 'Advanced' properties of the connector, as illustrated above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This feature is not supported on the MessageFormatter adapter, used by outbound connectors such as 'Send a Text Message' or 'Send an Email'. The enhancement was only made for the Text adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information helps -&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 00:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/formatting-the-date-in-the-messageformatter/m-p/397741#M1700</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2015-05-22T00:50:55Z</dc:date>
    </item>
  </channel>
</rss>

