Hi all,
I'm a newbie to Python, so I hope the question isn't too dumb.
I want to loop through the date in an attribute field of a point feature class and create new point feature classes for each date. Then, I want to save the layers with names, e.g. 24may98. For instance, I want to have a point layer of 24/5/1998 and so on. I find it tricky to work with as the data type is date/time instead of a string.
I tried to write the code below, but it did work. Thank you in advance for any assistant!
import arcpy
cursor = arcpy.da.SearchCursor("DBF_ExRainfall","Dates")
for row in cursor:
arcpy.management.MakeFeatureLayer(row, Dates_layer)
arcpy.management.SelectLayerByAttribute(Dates_layer, "SUBSET_SELECTION","Date = timestamp '{row}'")