I'm trying to figure out if it is possible to rename a field with the current date. What I am trying to accomplish is a table to table conversion, dropping a dozen fields, leaving only two fields, Name and Status. I want the Status field to be renamed to Status_yyyy_mm_dd. The script will then run a join field to another table, thus creating a history of the status field by day. I am running Arc 10.1. I have everything working, except the naming bit. Any help would be greatly appreciated.
import arcpy import time uiq = "uiq_data_set" gdb = "c:\\Temp\\default1.gdb" newFieldName = "Status_" + time.strftime('%Y_%m_%d') arcpy.TableToTable_conversion(uiq, gdb, "uiq_historic", "", "Name \"Name\" true true false 255 Text 0 0 ,First,#,c:\\Temp\\default1.gdb\\uiq_data_set,Name,-1,-1;Status\"Status\" true true false 255 Text 0 0 ,First,#,c:\\Temp\\default1.gdb\\uiq_data_set,Status,-1,-1", "")