More

How to set empty date field with arcpy.CalculateField_Management?

How to set empty date field with arcpy.CalculateField_Management?


I want to simply set my date field to empty i.e "". No problem directly in ArcGIS , but with arcpy I can't seem to get the syntax right. When I try with a date this is no problem e.g '22.06.2015' But with"it doesn't work.

arcpy.CalculateField_management(fc, item,","PYTHON")

Use the pythonNonestatement:

arcpy.CalculateField_management(fc, item, 'None',"PYTHON")

This is the literal for the NoneType that Branco mentioned. It appears that it will work with all field types (I did test with a DATE and it worked for me), although I've not tried it with everything.