Update Cursor from TEXT to DATE field

المشرف العام

Administrator
طاقم الإدارة
I have column that contains dates that are created from a numpy array to fc, since numpy doesn't handle date types I have had to create another field to update the rows. When using this script in the ArcPy window, no errors are returned, however my values do not change for UPDATE_DATE_DATE. What could cause this?

EDIT: For clarification, UPDATE_DATE_DATE is a DATE type field while OPEN_TIME is a string type field. And I would like to set the string values as DATE type in UPDATE_DATE_DATE.

EDIT: Here is an example of the date format for OPEN_TIME, 9/25/2015 12:29:04 AM.

cursor = arcpy.UpdateCursor(fc) for row in cursor: row.setValue("UPDATE_DATE_DATE", row.getValue("OPEN_TIME")) cursor.updateRow(row)

أكثر...
 
أعلى