I've been trying to load data from an excel spreadsheet into existing feature classes, but I've been having some trouble with the dates.
I've written a script that compares the values in the spreadsheet & in the feature class.
arcpy.MakeFeatureLayer_management(engPath, 'engPath') arcpy.SelectLayerByAttribute_management('engPath', "NEW_SELECTION", d) EngCursor = arcpy.da.SearchCursor('engPath', '*') for row in EngCursor: for item in Master_Dict.itervalues(): print item, row if item == row: i = 0 j = 2 while i < 34: if item[i] == row[j]: print "Values are the same" else: print "NOPE!", item[i], row[j] i+=1 j+=1
When I run the script, I get values like this:
Excel Spreadsheet Value = "41526.0" Feature Class Value = "2013-09-09 00:00:00"
Those two values are supposed to be identical, and the excel value for the cell does show "09/09/2013". I've checked the spreadsheet, and the column is set to a date data type.
I don't know how to tell arc that it is indeed looking at a date data type.