<?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: Date field to Text field automatically in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248463#M64269</link>
    <description>&lt;P&gt;Thanks for your input David. I'll look into it.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 13:54:42 GMT</pubDate>
    <dc:creator>RudyJamet</dc:creator>
    <dc:date>2023-01-16T13:54:42Z</dc:date>
    <item>
      <title>Date field to Text field automatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248198#M64245</link>
      <description>&lt;P&gt;I would like to automatically convert data from a survey populating a Created_Date field (ex: 10/10/2022 5:37:08 PM) after submission, into a Created_Date_Text field (ex: 20221010).&lt;/P&gt;&lt;P&gt;The geoprocessing tool Convert Time Field works fine but only on a one-time use basis. The text field is not updated when more data are added to the layer. I tried to schedule a recurrent Run but it's not working.&lt;/P&gt;&lt;P&gt;So I was wondering if someone would know of a Arcade/Python script to make the conversion automatically that I could insert into the Calculate Field tool for the text field.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 19:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248198#M64245</guid>
      <dc:creator>RudyJamet</dc:creator>
      <dc:date>2023-01-13T19:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date field to Text field automatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248205#M64246</link>
      <description>&lt;P&gt;The "strftime" method on Python datetime objects is the go-to way to get a stable text version of that data. Here's an example for Calculate Field:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;!Created_Date!.strftime("%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;For a full list of format codes check out&amp;nbsp;&lt;A href="https://strftime.org" target="_blank"&gt;https://strftime.org&lt;/A&gt;. If you want true live updates you'll probably want to look into Attribute Rules, here's an example for Arcade:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Text($feature["Created_date"], "Y-MM-DD HH:mm:ss")&lt;/LI-CODE&gt;&lt;P&gt;The reference for this is&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#text" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/text_functions/#text&lt;/A&gt;. There's disagreements in how the format codes work between the reference and the sample code so play around with the various opstions.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 20:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248205#M64246</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2023-01-13T20:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date field to Text field automatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248463#M64269</link>
      <description>&lt;P&gt;Thanks for your input David. I'll look into it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 13:54:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-field-to-text-field-automatically/m-p/1248463#M64269</guid>
      <dc:creator>RudyJamet</dc:creator>
      <dc:date>2023-01-16T13:54:42Z</dc:date>
    </item>
  </channel>
</rss>

