<?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: Not able to get Input String Date values to map or calc to Date Output Field in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1408956#M4169</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;have you seen this post? this should help you&lt;/P&gt;&lt;P&gt;&lt;A title="Date String to Date Date" href="https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-converting-strings-to-dates/ba-p/902141#:~:text=String%20to%20Date%20conversion%20format...&amp;amp;text=It%20turns%20out%20that%20if,ddThh%3Amm%3Asszone%22." target="_self"&gt;https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-converting-strings-to-dates/ba-p/902141#:~:text=String%20to%20Date%20conversion%20format...&amp;amp;text=It%20turns%20out%20that%20if,ddThh%3Amm%3Asszone%22.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 13:09:02 GMT</pubDate>
    <dc:creator>DominicRobergeIADOT</dc:creator>
    <dc:date>2024-04-12T13:09:02Z</dc:date>
    <item>
      <title>Not able to get Input String Date values to map or calc to Date Output Field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1408821#M4168</link>
      <description>&lt;P&gt;I am having a hard time getting a simple input string field (which is a date) from a CSV file that is in the following format:&amp;nbsp; "3/7/2024 12:39:42.784 PM" to map to an awaiting output definition as a date field.&lt;/P&gt;&lt;P&gt;Writing from input to output as String ... JSON output, works just fine.&amp;nbsp; But, any time I try to write to a GeoEvent Def that has a date field to hold this data - I get NULL results.&amp;nbsp; I've looked through many of the&amp;nbsp; link available via the Esri community and no luck.&amp;nbsp; I've tried adding this calc:&amp;nbsp;replaceAll(Field3, '(\d+)[/](\d+)[/](\d+)', '$3-$1-$2T00:00:00') ... and it works until I apply it to an awaiting date field.&amp;nbsp; I've tried setting the date format for the Input CSV.&lt;/P&gt;&lt;P&gt;Any guidance is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 23:06:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1408821#M4168</guid>
      <dc:creator>316353</dc:creator>
      <dc:date>2024-04-11T23:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to get Input String Date values to map or calc to Date Output Field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1408956#M4169</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;have you seen this post? this should help you&lt;/P&gt;&lt;P&gt;&lt;A title="Date String to Date Date" href="https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-converting-strings-to-dates/ba-p/902141#:~:text=String%20to%20Date%20conversion%20format...&amp;amp;text=It%20turns%20out%20that%20if,ddThh%3Amm%3Asszone%22." target="_self"&gt;https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-converting-strings-to-dates/ba-p/902141#:~:text=String%20to%20Date%20conversion%20format...&amp;amp;text=It%20turns%20out%20that%20if,ddThh%3Amm%3Asszone%22.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 13:09:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1408956#M4169</guid>
      <dc:creator>DominicRobergeIADOT</dc:creator>
      <dc:date>2024-04-12T13:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to get Input String Date values to map or calc to Date Output Field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1418496#M4181</link>
      <description>&lt;P&gt;Have you read through the examples in the thread:&lt;BR /&gt;&amp;nbsp;&lt;LI-MESSAGE title="Timestamps received from a sensor feed display differently in GeoEvent Sampler, ArcGIS REST Services queries, and ArcGIS Pro" uid="1268748" url="https://community.esri.com/t5/arcgis-geoevent-server-questions/timestamps-received-from-a-sensor-feed-display/m-p/1268748#U1268748" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think your expression&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;replaceAll(myField, '(\d+)[/](\d+)[/](\d+)', '$3-$1-$2T00:00:00')&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;may be taking the value &lt;STRONG&gt;&lt;FONT size="2" color="#0000FF"&gt;"3/7/2024 12:39:42.784 PM"&lt;/FONT&gt;&lt;/STRONG&gt; and producing the value &lt;STRONG&gt;&lt;FONT size="2" color="#0000FF"&gt;"2024-3-7T00:00:00 12:39:42.784 PM"&lt;/FONT&gt;&lt;/STRONG&gt;. Two problems with that are the month and day lost their leading zeros and the ISO 8601 format you're trying to create has unwanted characters from the original time appended to the tail of the string.&lt;/P&gt;&lt;P&gt;If you are OK with GeoEvent Server assuming the value &lt;STRONG&gt;&lt;FONT size="2" color="#0000FF"&gt;"3/7/2024 12:39:42.784 PM"&lt;/FONT&gt;&lt;/STRONG&gt; is local server time, you could edit the GeoEvent Definition&amp;nbsp; your input is using adapt the date/time string to specify the value be adapted as a&amp;nbsp;&lt;EM&gt;Date&lt;/EM&gt; and specify the input apply&amp;nbsp;&lt;STRONG&gt;&lt;FONT size="2"&gt;MM/dd/yyyy hh:mm:ss.SSS aa&lt;/FONT&gt;&lt;/STRONG&gt; as the&amp;nbsp;Expected Date Format parameter. Using this formatting string to "teach" the input how to parse your date/time string, I was able to adapt the string&amp;nbsp;&lt;STRONG&gt;&lt;FONT size="2" color="#0000FF"&gt;"3/7/2024 12:39:42.784 PM"&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;as an epoch value&amp;nbsp;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;FONT color="#993300"&gt;1709843982784&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;.&amp;nbsp; I could then use a&amp;nbsp;&lt;EM&gt;Field Mapper to&amp;nbsp;&lt;/EM&gt;cast this &lt;EM&gt;Date&lt;/EM&gt;&amp;nbsp;value to a&amp;nbsp;&lt;EM&gt;String&lt;/EM&gt;&amp;nbsp;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;"Thu Mar 07 12:39:42 PST 2024"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;to double-check the data was adapted properly.&lt;/P&gt;&lt;P&gt;-- RJ&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 01:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/not-able-to-get-input-string-date-values-to-map-or/m-p/1418496#M4181</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2024-05-03T01:54:31Z</dc:date>
    </item>
  </channel>
</rss>

