I have a NumPyArray that I would like to use a where clause . My workflow is if my first NumPyArray to feature fails then run another one with a where clause of data that has come into a json web-service in the past 10 minutes. I would ideally like to implement a where clause in both scenarios. Here is what I have:
arr = np.array(items,dtype=dt)
sr = arcpy.SpatialReference(4326)
NumPyArray = arcpy.da.NumPyArrayToFeatureClass(arr, fc, ['longitudeshape', 'latitudeshape'], sr)
#I would like to use a five minute whereclause here for my Date field.
cursor = arcpy.SearchCursor(fc,"""Date BETWEEN '2014-02-16 16:53:25' AND '2015-02-17 16:53:25'""" )
for row in cursor:
print(row.getValue("Date"))
if row.getValue("Date") < datetime.datetime.now():
print "true"
else:
"excecute numpy array for a 10 minute window."