In a model, after joining a shapefile to a text file, I am trying to calculate a newly created Date format field in the shapefile. But, whenever I have an empty date in the text file, the if else statment catches it and tries to fill a Null value in the Date field. But it crashes and not not work!
But none worked! Any guess for the proper syntax? Thanks
Solved! Go to Solution.
you have a code block but no field calculator expression
Addendum Shapefiles don't support None, you will have to check for the empty string "" or ''
Tried "" or '' but still no luck! Tested it on shapefile and FGDB feature class as well.
As for the field calculator expression, it looks empty but actually it is not. It always does not show for no reason.
The problem comes from the None or Null format in the date field because if I set any date instead, it does work. Also, it works in former ArcToolbox. Is it related to Python 3 ? There must be a solution...
Fount it! The statment is:
with no single quotes!