1

I have datetime field in a CSV with the following format:

Time    
2007-02-01 05:00:00+00:00

When I use the append tool in ArcGIS Pro to load data to a table on a SQL Server Enterprise geodatabase, the datetime for all records defaults to:

12/30/1899

I'm not really sure how to proceed since I'm not sure what the issue is.

5
  • 2
    SQL Server has more than one date datatype. Are you using the supported one?
    – Vince
    Oct 5, 2021 at 16:38
  • 1
    You had a tag for Python but have not included any code to show how that is relevant to your question so I’m removing it.
    – PolyGeo
    Oct 5, 2021 at 20:13
  • @Vince I created the table using ArcPro. Using the interface, there's only an option for a "date" field Oct 7, 2021 at 14:10
  • So then the CSV parsing is the issue, no? I don't trust CSVs farther then I can throw a minivan, so I generally parse them in Python and use an InsertCursor, vice Append.
    – Vince
    Oct 7, 2021 at 16:28
  • Without an accompanying schema.ini file setting the CSV data types of columns, the datetime values are likely going to be seen as text. The inclusion of UTC offset information in the datetime value, i.e., +00:00, confuses the built-in parser that would normally convert a string value representation of datetime to an actual datetime value. When the parser gets confused, it fails back to using a datetime epoch of 12/30/1899.
    – bixb0012
    Jul 10, 2022 at 15:20

1 Answer 1

0

The database is reading the values as null: https://pro.arcgis.com/en/pro-app/latest/tool-reference/tool-errors-and-warnings/110001-120000/tool-errors-and-warnings-110401-110425-110413.htm

There might be an issue with how Pro is interpreting your data. Try importing the csv into a table, checking the data type, and then appending it.

For anyone having this issue with trying to join a field, I was having this issue when I tried to use OBJECTID or GlobalID for the join. When I used a different field to join, the correct dates came over.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.