I've got a script that does a number of Date/Time conversions using arcpy.ConvertTimeField_Management
. A common issue that I need to handle is when the field is empty and an execute error is raised:
arcgisscripting.ExecuteError: ERROR 000192: Invalid value for Time Format = 'yyyyMMddHHmmss' - was not able to successfully convert any row's time field value
This error occurs when I use the try/except below; I'd like the script to ignore this error and continue. Any ideas?
try:
results = arcpy.ConvertTimeField_management(SA_TEN_GOV_els, "START_DATE", "yyyyMMddHHmmss", "START_DAT", "DATE", "'Not Used'")
except:
print results.getMessages()
pass