AnsweredAssumed Answered

Setting historical version of layer

Question asked by MCederholm on Oct 24, 2017
Latest reply on Dec 11, 2017 by ksadrak

I'm trying to set the historical version of a layer using ChangeVersion_management, but it's not working in Desktop (10.2.1, 10.5.1).  When I export the layer to a new feature class, I'm getting the current features rather than the historical ones.  What am I doing wrong?

dtHistorical =, 12, 29)
iYear = dtHistorical.year
sLeakSurveyName = "LeakSurvey" + str(iYear)
arcpy.MakeFeatureLayer_management(sConnectionFile + "/LeakSurvey", "LyrLeakSurvey")
sDate = dtHistorical.strftime("%m/%d/%Y")
arcpy.ChangeVersion_management("LyrLeakSurvey", "HISTORICAL", "", sDate)
arcpy.CopyFeatures_management("LyrLeakSurvey", sLeakSurveyName)


However, the code DOES work in Pro 2.0.1!


Perhaps it's a date formatting issue?