<?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: to rename a table where the date can be part of the name in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730960#M56727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I could get the date in the script but I can not concatenate the string "AMR" with the date after that. (AMR20111705).&amp;nbsp; Any help on this? thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2011 21:44:51 GMT</pubDate>
    <dc:creator>CarlosFlores1</dc:creator>
    <dc:date>2011-05-18T21:44:51Z</dc:date>
    <item>
      <title>to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730958#M56725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to include a line on my script that will rename a table with "ARM" +Date (current date).&amp;nbsp; I am new in python and really do not know where to find this information. I am using ArcGIS 9.3 with an ArcInfo license. Here is the line that I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Rename...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.Rename_management(NewAMR, AMR+?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 18:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730958#M56725</guid>
      <dc:creator>CarlosFlores1</dc:creator>
      <dc:date>2011-05-18T18:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730959#M56726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://docs.python.org/release/2.6.5/library/datetime.html"&gt;http://docs.python.org/release/2.6.5/library/datetime.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gives you all the info you need depending on how you want your date formatted.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 18:59:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730959#M56726</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-05-18T18:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730960#M56727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I could get the date in the script but I can not concatenate the string "AMR" with the date after that. (AMR20111705).&amp;nbsp; Any help on this? thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 21:44:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730960#M56727</guid>
      <dc:creator>CarlosFlores1</dc:creator>
      <dc:date>2011-05-18T21:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730961#M56728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;use "AMR" + str(yourdate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 04:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730961#M56728</guid>
      <dc:creator>AlessandroCinnirella</dc:creator>
      <dc:date>2011-05-19T04:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730962#M56729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your help. The rename tool process does not take the date as a part of the renaming name for some reason. I used the "AMR" + str(date) and did not work, I even changed this several times to a diferent format and is not taking it. Any Ideas?&amp;nbsp; It works ok if I use the time in a separate script :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from datetime import date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;time = date.today()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#print time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STRING = "AMR"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print STRING + str(time)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try to use this in the rename tool process it does not take it.&amp;nbsp; Help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 15:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730962#M56729</guid>
      <dc:creator>CarlosFlores1</dc:creator>
      <dc:date>2011-05-19T15:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: to rename a table where the date can be part of the name</title>
      <link>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730963#M56730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think you can use an expression in the actual function call (ie. you can't type "AMR" + str(date) in the parentheses for gp.Rename_management). What you can do is pass a variable into the function call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;datestring = "AMR" + str(date)
gp.Rename_management(NewAMR, datestring)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/to-rename-a-table-where-the-date-can-be-part-of/m-p/730963#M56730</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T07:12:32Z</dc:date>
    </item>
  </channel>
</rss>

