<?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: Converting a string into date format in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287200#M68944</link>
    <description>&lt;P&gt;Datetime strptime module will cover this for you.&amp;nbsp; I've pinched the syntax from googling.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from datetime import datetime

input_string = '20220617010000'

dt_object = datetime.strptime(input_string, '%Y%m%d%H%M%S')
#print(dt_object)
return dt_object&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 09 May 2023 12:39:15 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2023-05-09T12:39:15Z</dc:date>
    <item>
      <title>Converting a string into date format</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287150#M68939</link>
      <description>&lt;P&gt;Hello, I want to use ArcGIS Pro (version 3.1.0) to create a space time cube, but I am having problems converting the field with the datetime into date format. The tool "Convert Time Field" only converted the date, but left out the time (more specifically the string '20220617010000' in the format 'yyyyMMddHHmmss' was converted to '6/7/2022'. Different formats of the datatime also haven't worked.&amp;nbsp;I also tried using the tool "Calculate Field", but with this I also only managed to convert the date without the time. Does anyone know how to solve this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 07:48:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287150#M68939</guid>
      <dc:creator>KlaraHonzak</dc:creator>
      <dc:date>2023-05-09T07:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a string into date format</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287200#M68944</link>
      <description>&lt;P&gt;Datetime strptime module will cover this for you.&amp;nbsp; I've pinched the syntax from googling.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from datetime import datetime

input_string = '20220617010000'

dt_object = datetime.strptime(input_string, '%Y%m%d%H%M%S')
#print(dt_object)
return dt_object&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 12:39:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287200#M68944</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-05-09T12:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a string into date format</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287592#M68998</link>
      <description>&lt;P&gt;Yes, I also expected that this would work, but for some reason the resulting field is in text format and not date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 09:01:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287592#M68998</guid>
      <dc:creator>KlaraHonzak</dc:creator>
      <dc:date>2023-05-10T09:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a string into date format</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287786#M69018</link>
      <description>&lt;P&gt;Strange.&amp;nbsp; Do you have a screenshot to get more of an understanding what may be happening?&lt;/P&gt;&lt;P&gt;The field type is definitely Date?&lt;/P&gt;&lt;P&gt;In the field designer, have you got any custom formatting or Default settings on (default would match your system time format)&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/tables/format-numeric-and-date-fields.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/tables/format-numeric-and-date-fields.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd set the format to 'None'&amp;nbsp; - Note times of Midnight will show as having no time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from the link:&lt;/P&gt;&lt;H2&gt;Date and time formats&lt;/H2&gt;&lt;P&gt;Date formats, unlike numeric formats, only have one category: Date. Within this category, you can choose from multiple supported date formats. The default is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;, which includes the full date and time, except for midnight when only the date is shown. Optionally, you can choose&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;System Default&lt;/SPAN&gt;, the date displayed matches the default established by the operating system, or use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Custom&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to generate your own format string.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 16:23:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/converting-a-string-into-date-format/m-p/1287786#M69018</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-05-10T16:23:15Z</dc:date>
    </item>
  </channel>
</rss>

