<?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: Add Ordinal Letter to Cell Value in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64339#M5254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, time left is a tough one since it's going to vary with resource usage. You can use the progressor to show percent complete at least. You can also set the message for the progressor, so you could do something like display a time stamp periodically to help keep tabs if it's still running. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe writing the progressor message is less overhead than writing to the window. Still might want to set it up so it updates every 100 ro 1,000 records instead of for every record though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Oct 2013 19:17:16 GMT</pubDate>
    <dc:creator>MattSayler</dc:creator>
    <dc:date>2013-10-11T19:17:16Z</dc:date>
    <item>
      <title>Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64332#M5247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to add a letter to the end of a field name that increases for the selection set.&amp;nbsp; I have two shapefiles I'm working with of mosaiced tiles.&amp;nbsp; My script selects a large tile, copies the name value, then selects the smaller tiles from the second shapefile and assigns it the copied name.&amp;nbsp; But I need each of the smaller tiles to have a letter appended on so they each have different names.&amp;nbsp; It is possible to use a variable on a list to incrementally go to the next letter?&amp;nbsp; Here's my script, and it works with just adding the letter "A" to the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy, os

#set map doc and the layer to be used
mxd = arcpy.mapping.MapDocument("Current")
mapLyr1 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid400_IowaSP") [0]
mapLyr2 = arcpy.mapping.ListLayers(mxd, "GridIndexFeatures20") [0]

#alpha will be assigned a letter to rows2 update, there are 16
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p']
name = str()
searchrow = 0
rows1 = arcpy.SearchCursor(mapLyr1, "", "", "Name")
rows2 = arcpy.UpdateCursor(mapLyr2, "", "", "tile")
rows = arcpy.UpdateCursor(mapLyr2)
for row in rows1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; name = row.getValue("Name")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr1, "NEW_SELECTION", '"FID" = %s' %searchrow)
&amp;nbsp;&amp;nbsp;&amp;nbsp; searchrow = searchrow + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(mapLyr2, "HAVE_THEIR_CENTER_IN", mapLyr1, 0, "ADD_TO_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.tile = name + A
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2.updateRow(row)
del mxd, rows, rows1, rows2, searchrow&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 17:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64332#M5247</guid>
      <dc:creator>GeoffOlson</dc:creator>
      <dc:date>2013-10-08T17:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64333#M5248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looping through the characters you want to use is potentially safer, slightly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a few other ways, but they rely on incrementing the character code numbers, which could potentially bring unexpected results, i.e. wrong letter. That's probably not likely to happen though, as the codes for the latin alphabet should be pretty consistent for western character sets, but worth being aware of.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This post has some options:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/11827226/can-we-increase-a-lowercase-character-by-one"&gt;http://stackoverflow.com/questions/11827226/can-we-increase-a-lowercase-character-by-one&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you want to do if you hit the end of the list? Repeat? Double up, i.e. 'aa'?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 20:08:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64333#M5248</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-10-09T20:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64334#M5249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks.&amp;nbsp; That's what I ended up doing.&amp;nbsp; But I didn't realize you could use a defined variable as the index number in the list.&amp;nbsp; I thought it was necessary to format the line with something like alpha[%d] %letterplace.&amp;nbsp; Here's my final script, but it is taking FOREVER to run through all the features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

#set map doc and the layer to be used
mxd = arcpy.mapping.MapDocument("Current")
mapLyr1 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid400_IowaSP") [0]
mapLyr2 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid100_IowaSP") [0]

#alpha will be assigned a letter to rows2 update, there are 16
place = 0
alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']
name = str()
searchrow = 0
rows1 = arcpy.SearchCursor(mapLyr1, "", "", "Name")
rows2 = arcpy.UpdateCursor(mapLyr2, "", "", "tile")
rows = arcpy.UpdateCursor(mapLyr2)
for row in rows1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; name = row.getValue("Name")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr1, "NEW_SELECTION", '"FID" = %s' %searchrow)
&amp;nbsp;&amp;nbsp;&amp;nbsp; searchrow = searchrow + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(mapLyr2, "HAVE_THEIR_CENTER_IN", mapLyr1, 0, "ADD_TO_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.tile = name + alpha[place]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = place + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if place == 16:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = 0
del mxd, rows, rows1, rows2, searchrow&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it necessary to define "row in rows2:" as "row2 in rows2" since row is in use by rows1?&amp;nbsp; I thought "row" was a keyword used by arcpy, because I think trying "row2 in rows2" was giving me an error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:27:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64334#M5249</guid>
      <dc:creator>GeoffOlson</dc:creator>
      <dc:date>2021-12-10T22:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64335#M5250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks.&amp;nbsp; That's what I ended up doing.&amp;nbsp; But I didn't realize you could use a defined variable as the index number in the list.&amp;nbsp; I thought it was necessary to format the line with something like alpha[%d] %letterplace.&amp;nbsp; Here's my final script, but it is taking FOREVER to run through all the features.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

#set map doc and the layer to be used
mxd = arcpy.mapping.MapDocument("Current")
mapLyr1 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid400_IowaSP") [0]
mapLyr2 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid100_IowaSP") [0]

#alpha will be assigned a letter to rows2 update, there are 16
place = 0
alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']
name = str()
searchrow = 0
rows1 = arcpy.SearchCursor(mapLyr1, "", "", "Name")
rows2 = arcpy.UpdateCursor(mapLyr2, "", "", "tile")
rows = arcpy.UpdateCursor(mapLyr2)
for row in rows1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; name = row.getValue("Name")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr1, "NEW_SELECTION", '"FID" = %s' %searchrow)
&amp;nbsp;&amp;nbsp;&amp;nbsp; searchrow = searchrow + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(mapLyr2, "HAVE_THEIR_CENTER_IN", mapLyr1, 0, "ADD_TO_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.tile = name + alpha[place]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = place + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if place == 16:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = 0
del mxd, rows, rows1, rows2, searchrow&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Few things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;If you're at 10.1 or newer, try using the cursors from the&amp;nbsp; 'da' module instead. They're supposed to be much more efficient. &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/What_is_the_data_access_module/018w00000008000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/What_is_the_data_access_module/018w00000008000000/&lt;/A&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Also, check out the 'format()' method instead of using %s for substitutions. Newer way to do things and I think a little bit easier to use. &lt;A href="http://docs.python.org/release/2.6.8/library/string.html#format-examples" rel="nofollow noopener noreferrer" target="_blank"&gt;http://docs.python.org/release/2.6.8/library/string.html#format-examples&lt;/A&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If this is the whole script, you don't need to import os. If it's just a snippet and you're using os later, disregard.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it necessary to define "row in rows2:" as "row2 in rows2" since row is in use by rows1?&amp;nbsp; I thought "row" was a keyword used by arcpy, because I think trying "row2 in rows2" was giving me an error.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;'row' is just a (local) variable name. You can use just about whatever you want, 'item', 'thing', 'chair'. You will want to use something different for each cursor. Right now the 'row' in the second 'for' statement is probably walking on the 'row' from the first. The error you were getting must have been due to something else. What was the error message?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:28:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64335#M5250</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2021-12-10T22:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64336#M5251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem with row in the nested loop was that it didn't match the row.Update(row) part a couple lines down.&amp;nbsp; The interpreter was just giving me a 99999 error with no description.&amp;nbsp; Here's my working script.&amp;nbsp; The only problem is that my percent calculation doesn't work for some reason.&amp;nbsp; I don't know why, but it always just says 2.00000 percent regardless of what it looks like the calculation should be.&amp;nbsp; This took several hours to run so that's why I included the AddMessage lines to each main loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

#set map doc and the layer to be used
mxd = arcpy.mapping.MapDocument("Current")
mapLyr1 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid400_IowaSP") [0]
mapLyr2 = arcpy.mapping.ListLayers(mxd, "NEW_BiState_Grid100_IowaSP") [0]

#alpha will be assigned a letter to rows2 update, there are 16
place = 0
alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']
searchrow = 0
rows1 = arcpy.SearchCursor(mapLyr1, "", "", "Name")
rowcount = int(arcpy.GetCount_management(mapLyr1).getOutput(0))
allrows = (rowcount + 0.0)
for row in rows1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; bigtile = str()
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr1, "NEW_SELECTION", '"FID" = %s' %searchrow)
&amp;nbsp;&amp;nbsp;&amp;nbsp; bigtile = row.getValue("Name")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print bigtile
&amp;nbsp;&amp;nbsp;&amp;nbsp; searchrow = searchrow + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; prgrow = (searchrow + 0.0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(mapLyr2, "HAVE_THEIR_CENTER_IN", mapLyr1, 0, "ADD_TO_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2 = arcpy.UpdateCursor(mapLyr2, "", "", "", "FID")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2.tile = bigtile + alpha[place]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2.updateRow(row2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = place + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if place == 16:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr1, "CLEAR_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(mapLyr2, "CLEAR_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp; prgrss = ((prgrow / allrows)*100.0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("%d current row" %searchrow)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("%d total rows" %rowcount)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("%f percent completed" %prgrss)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("______________________________")
del mxd, row, rows1, row2, rows2, searchrow, place, bigtile, rowcount, prgrow, allrows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: fixed variable prgss to match prgrss.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64336#M5251</guid>
      <dc:creator>GeoffOlson</dc:creator>
      <dc:date>2021-12-10T22:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64337#M5252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are some built in classes for handling the progress bar, which might be easier and probably runs faster (printing to the message window has a lot of overhead). &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000003z000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000003z000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How many records are you working with?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 17:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64337#M5252</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-10-11T17:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64338#M5253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the link.&amp;nbsp; This script is being used on a shapefile with ~8500 features to name the tiles (16x16) within each of those ~8500 features, so about 130,000 features are being calculated.&amp;nbsp; My script ran fine, it just took 8-10 hours.&amp;nbsp; I was looking into a time left message by getting the time at the beginning of each loop and again at the end, then multiplying that by the number of loop cycles left, but I'm using the Python deltatime function and can't figure out how to format it.&amp;nbsp; I tried &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clock1 = datetime.now() #beginning of loop
&amp;nbsp;&amp;nbsp;&amp;nbsp; clock2 = datetime.now() end of loop
&amp;nbsp;&amp;nbsp;&amp;nbsp; clock3 = ((clock2 - clock1) * rowsleft) # rowsleft is total records minus completed records
&amp;nbsp;&amp;nbsp;&amp;nbsp; clock4 = clock3.strftime('%d Days, %h Hours, %M Minutes, %S Seconds')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I get an error that 'datetime.timedelta' object has no attribute 'strftime' so I'm not sure how to get that working.&amp;nbsp; Anyway, the script does run, it just took a really long time, so I learned it's nice to know when a long script is working properly versus being in an infinite loop.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64338#M5253</guid>
      <dc:creator>GeoffOlson</dc:creator>
      <dc:date>2021-12-10T22:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add Ordinal Letter to Cell Value</title>
      <link>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64339#M5254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, time left is a tough one since it's going to vary with resource usage. You can use the progressor to show percent complete at least. You can also set the message for the progressor, so you could do something like display a time stamp periodically to help keep tabs if it's still running. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe writing the progressor message is less overhead than writing to the window. Still might want to set it up so it updates every 100 ro 1,000 records instead of for every record though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 19:17:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-ordinal-letter-to-cell-value/m-p/64339#M5254</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-10-11T19:17:16Z</dc:date>
    </item>
  </channel>
</rss>

