Skip to main content
Solved

Request for input s- Unable to update the date field record using arcpy updatecursor in FME


spill002
Contributor
Forum|alt.badge.img+1

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. [e_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

 

Best answer by nielsgerrits

spill002 wrote:

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

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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


spill002
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 13, 2024

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 :  

 

 


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • March 13, 2024
spill002 wrote:

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


spill002
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 13, 2024

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

Our issue got resolved.


nielsgerrits
VIP
Forum|alt.badge.img+54
spill002 wrote:

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

Our issue got resolved.

Happy to help :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings