<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting historical version of layer in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/setting-historical-version-of-layer/m-p/230800#M7992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like it is a bug.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3" title="http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3"&gt;NIM087927: ChangeVersion_management() in the Python window igno..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And since it is has been since 2013, it will probably remain a bug.&lt;/P&gt;&lt;P&gt;It looks to my like arcpy doesn't like any historical versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2017 20:41:12 GMT</pubDate>
    <dc:creator>KevinSadrak</dc:creator>
    <dc:date>2017-12-11T20:41:12Z</dc:date>
    <item>
      <title>Setting historical version of layer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-historical-version-of-layer/m-p/230799#M7991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to set the historical version of a layer using&amp;nbsp;ChangeVersion_management, but it's not working in Desktop (10.2.1, 10.5.1). &amp;nbsp;When I export the layer to a new feature class, I'm getting the current features rather than the historical ones. &amp;nbsp;What am I doing wrong?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;dtHistorical &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;date&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2016&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;12&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;29&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
iYear &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; dtHistorical&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;year
sLeakSurveyName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LeakSurvey"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;iYear&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sConnectionFile &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"/LeakSurvey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LyrLeakSurvey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
sDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; dtHistorical&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strftime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"%m/%d/%Y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ChangeVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"LyrLeakSurvey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"HISTORICAL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sDate&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"LyrLeakSurvey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sLeakSurveyName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the code DOES work in Pro 2.0.1!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps it's a date formatting issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-historical-version-of-layer/m-p/230799#M7991</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2021-12-11T11:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Setting historical version of layer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-historical-version-of-layer/m-p/230800#M7992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like it is a bug.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3" title="http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3"&gt;NIM087927: ChangeVersion_management() in the Python window igno..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And since it is has been since 2013, it will probably remain a bug.&lt;/P&gt;&lt;P&gt;It looks to my like arcpy doesn't like any historical versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 20:41:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-historical-version-of-layer/m-p/230800#M7992</guid>
      <dc:creator>KevinSadrak</dc:creator>
      <dc:date>2017-12-11T20:41:12Z</dc:date>
    </item>
  </channel>
</rss>

