I'm a complete beginner trying to update some fields in an attribute table (i.e. an ArcMap Shapefile) using Python tool. My goal it to update the values from this column to another date notation.
Right now the fields look like this:
The dates need to be replaced to the following format MM/DD/YYY. There are also some spaces (as shown above in the example) that I would like to replace to something like "No date available".
This is what I wrote:
for row in updateCursor: theWrongDate = row.RPT_DTE theRightDateList = theWrongDate.split("/") year = '19' + str(theRightDateList) month = theRightDateList day = theRightDateList theWrongDate = month + '/' + day + '/' + year updateCursor.updateRow(row)
and Python gives me an error message:
"month = theRightDateList IndexError: list index out of range"