I have a datetime field in a Pandas dataframe that becomes problematic when using ArcGIS Pro to load data from a csv to a table on ArcSDE. The field in Pandas looks like this:
2007-02-01T05:00:00.0000000+00:00
but the output in field in ArcGIS Pro reads the datetime column as 12/30/1899 throughout the entire dataset.
I tried using a pandas script to parse the field:
df['Time'] = pd.to_datetime(['Time'],
format="%Y-%m-%dT%H:%M:%S.%f")
but I'm receiving:
ValueError: time data Time doesn't match format specified
I simply want the field in an acceptable format to load into an ArcSDE table.
Update:
The suggested change worked:
df['Time'] = pd.to_datetime(df['Time'], format="%Y-%m-%dT%H:%M:%S.%f", errors = 'coerce')
The result in Pandas is this:
Time
2007-02-01 05:00:00+00:00
but after using the append tool in ArcGIS Pro, the time field defaults to:
12/30/1899