Skip to main content
Solved

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

  • March 13, 2024
  • 5 replies
  • 74 views

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

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+62

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+62
  • Best Answer
  • 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 :  

 

 

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+62

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

Our issue got resolved.

Happy to help :)