Skip to main content

Hello,

 

I am trying to update the date field records of a feature class using arcpy update cursor, but I am getting the following error (text in bold), please let me know If I am missing anything :  

 

Field Name : e_result_datetime

Field Values : 20230803081554 

Field datatype : Date

 

Also, want to mention that I am able to update the string, double data type fields using updatecursor in FME with no issues - it’s only with date data type I am facing the problem.

 

Python Exception <RuntimeError>: The value type is incompatible with the field type. fe_result_datetime]
Traceback (most recent call last):
  File "<string>", line 46, in input
RuntimeError: The value type is incompatible with the field type. e_result_datetime]
Error encountered while calling method `input'
PythonCaller (PythonFactory): PythonFactory failed to process feature

 

You will need to reformat the date from fme datetime to something ESRI understands.

You can use a DateTimeConverter to do this. It needs to be formatted as %Y-%m-%d %H:%M:%S


Thanks for looking at it and sharing your thoughts on it, but still I am getting an error. 

 

Please find the below snapshot of the same :  

 

 


Thanks for looking at it and sharing your thoughts on it, but still I am getting an error. 

 

Please find the below snapshot of the same :  

 

 

I think it needs to be

%Y-%m-%d %H:%M:%S

and not

%Y-%m-%dT%H:%M:%S


Thanks a lot, appreciate for looking at it and sharing your inputs on it.

Our issue got resolved.


Thanks a lot, appreciate for looking at it and sharing your inputs on it.

Our issue got resolved.

Happy to help :)


Reply