Changing date format of feature class with ArcPy

المشرف العام

Administrator
طاقم الإدارة
I thought this was fairly straightforward; however I am receving NameError: name 'dt' is not defined. What is being done incorrectly? My orginal timestamp is m/d/yyyy h:mm:ss i would like to change it to %m/%d/%Y

>>> rows = arcpy.UpdateCursor(aTable) ... for row in rows: ... datetimeVal = row.getValue("last_edited_date") ... formattedTime = dt.strftime(datetimeVal, "%m/%d/%Y") ... print formattedTime ... row.setValue("PickupDate", formattedTime) ... rows.updateRow(row) ... del rows, row

أكثر...
 
أعلى