<?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: Field formatting issue (importing XY Data from CSV - Python) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149797#M63917</link>
    <description>&lt;P&gt;try&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/excel-to-table.htm" target="_blank"&gt;Excel To Table (Conversion)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;first then the make event layer.&amp;nbsp; If numbers don't work you might have to try it as a text field&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2022 19:21:42 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-03-02T19:21:42Z</dc:date>
    <item>
      <title>Field formatting issue (importing XY Data from CSV - Python)</title>
      <link>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149768#M63916</link>
      <description>&lt;P&gt;I'm using&amp;nbsp;ArcPro 2.7.0. I'm working on a python script that brings in X,Y data from a CSV using the&amp;nbsp;arcpy.MakeXYEventLayer_management&amp;nbsp;tool provided by ArcGIS arcpy module. The ultimate goal is to use the data in the CSV to show a time slider in ArcPro. I have a field (T) that has the time formatted as:&amp;nbsp;YYYYMMDDHHMMSS.&lt;/P&gt;&lt;P&gt;I have no issue displaying the X,Y point and creating a shapefile with it. My issue is the field leaves out the seconds at the end of each value in the Time(T) field.&lt;/P&gt;&lt;P&gt;For example, the values would be&amp;nbsp;202002251200000,&amp;nbsp;202002251200001,&amp;nbsp;202002251200002,&amp;nbsp;202002251200003&amp;nbsp;etc., but they all come out as&amp;nbsp;202002251200000&amp;nbsp;(seemingly rounding the values) despite being correct in my CSV after running my script.&lt;/P&gt;&lt;P&gt;The field type in the Excel &lt;A href="https://www.tommypetarabic.com/" target="_self"&gt;CSV&lt;/A&gt; is 'General'. Is there something I'm missing in my XY Event layer tool in the script below?&lt;/P&gt;&lt;P&gt;I've tried a few things such as change the field type to type 'Number' with zero decimal places.&lt;/P&gt;&lt;P&gt;My script in Python:&lt;/P&gt;&lt;PRE&gt;# Run MakeXY Event Layer, creating point locations, assign to arbitrary spatial ref
spRef = arcpy.SpatialReference(32616)
arcpy.MakeXYEventLayer_management("testplot.csv", "Y", "X", "XY_Points.lyr", spRef)

# Process: Feature Class to Feature Class
arcpy.CopyFeatures_management("XY_Points.lyr", "XY_PointData")

# Creating Grid Buffer Index Features
arcpy.GraphicBuffer_analysis("XY_PointData.shp", "GridIndexFeatures.shp", "2.5 meters", "SQUARE", "MITER")

# Delete unnecessary fields from Grid Index shapefile
arcpy.DeleteField_management("GridIndexFeatures.shp", ["BUFF_DIST", "ORIG_FID"])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 16:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149768#M63916</guid>
      <dc:creator>TamnaSidhart</dc:creator>
      <dc:date>2022-03-05T16:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field formatting issue (importing XY Data from CSV - Python)</title>
      <link>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149797#M63917</link>
      <description>&lt;P&gt;try&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/excel-to-table.htm" target="_blank"&gt;Excel To Table (Conversion)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;first then the make event layer.&amp;nbsp; If numbers don't work you might have to try it as a text field&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 19:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149797#M63917</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-02T19:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field formatting issue (importing XY Data from CSV - Python)</title>
      <link>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149800#M63918</link>
      <description>&lt;P&gt;Shapefile format doesn't store date and time in the same field.&amp;nbsp; Create a Feature Class within a File Geodatabase.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 19:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-formatting-issue-importing-xy-data-from-csv/m-p/1149800#M63918</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2022-03-02T19:28:19Z</dc:date>
    </item>
  </channel>
</rss>

