<?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: import arcpy tramples datetime import in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288338#M22327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- python 3.10, arcpy 2.6 beta 2&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; datetime &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime
list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1908941284840&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908942659400&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908930535160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1381901040&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1908941284840&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908942659400&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908930535160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1381901040&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- looks good&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:56:03 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-12-11T13:56:03Z</dc:date>
    <item>
      <title>import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288325#M22314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never seen anything that states arcpy should/must be imported first in order to not override other system modules.&amp;nbsp; I only skimmed this &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/importing-arcpy.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;document&lt;/A&gt; but didn't see anything specific, although their examples tend to imply it.&amp;nbsp; However if you do a import-from on datetime BEFORE importing arcpy, then you're datetime import will be destroyed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; from datetime import datetime
&amp;gt;&amp;gt;&amp;gt; datetime.now()
datetime.datetime(2016, 7, 14, 12, 10, 12, 433000)
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; datetime.now()
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
AttributeError: 'module' object has no attribute 'now'
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either import datetime after arcpy or use the import-from-as syntax and give datetime an alias.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:55:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288325#M22314</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2021-12-11T13:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288326#M22315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of ArcGIS/Python are you experiencing this in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:07:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288326#M22315</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2016-07-15T15:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288327#M22316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see it on all the ones I've tried so far:&lt;/P&gt;&lt;P&gt;32 bit 10.3.1&lt;/P&gt;&lt;P&gt;64 bit 10.3.1&lt;/P&gt;&lt;P&gt;32 bit 10.4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haven't tired any others. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288327#M22316</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-07-15T15:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288328#M22317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I'll test and submit a bug report. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288328#M22317</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2016-07-15T15:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288329#M22318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, thanks.&amp;nbsp; At the very least, note it in the document about importing Arcpy.&amp;nbsp; There's always the chance of namespace/module collision but I've never seen one like this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288329#M22318</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-07-15T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288330#M22319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a workaround you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import datetime
datetime.datetime.now()
import arcpy
datetime.datetime.now()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or alternatively:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from datetime import datetime as dt
dt.now()
import arcpy
dt.now()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'll still look into the actual bug as well &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:55:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288330#M22319</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2021-12-11T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288331#M22320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I've started making arcpy the first import and using the second option, safe aliases, a standard. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288331#M22320</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-07-15T15:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288332#M22321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/161073"&gt;Clinton Dow&lt;/A&gt;‌ has this been resolved in any released version of ArcGIS? Or is there a Nimbus # associated with it yet? I'm also running into this at 10.4.1, though it is easy enough to work around.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 23:32:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288332#M22321</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2017-08-22T23:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288333#M22322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently its logged on our internal version control system as a bug, but lower priority due to the workaround. I'll bring it up again at the next Python meeting. I figure it could be fairly&amp;nbsp;problematic if arcpy is used mid-stream in a script that imports other complex packages.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 22:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288333#M22322</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2017-08-25T22:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288334#M22323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While you are talking about &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;datetime&lt;/SPAN&gt;, maybe just mention that &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;math&lt;/SPAN&gt;, &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;sys&lt;/SPAN&gt;, and &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;time&lt;/SPAN&gt; also get clobbered when importing &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcpy&lt;/SPAN&gt;.&amp;nbsp; I can understand arcpy importing arcgis, but I can't think of any other packages I work with that re-import base packages into the global namespace.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Aug 2017 15:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288334#M22323</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-08-26T15:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288335#M22324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;People had better scrounge around in their __init__.py files.&lt;/P&gt;&lt;P&gt;Perhaps the import should check for the existence in the namespace at least or use names that are unlikely to occur.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;c&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;\\arcpro\\resources\\arcpy\\arcpy\\__init__&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;py&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;time &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; time&amp;nbsp; &lt;SPAN class="comment token"&gt;# ????&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#how about, _time or thyme or time_ or about‍‍‍_ or tImE&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288335#M22324</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288336#M22325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; datetime &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime
map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;48738160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;57747920&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;47497264&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1699354320&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;48738160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;57747920&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;47497264&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;57866672&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The only ID that changes is datetime, so I'm not sure if that's actually the case. But we can look further into it as well.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:56:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288336#M22325</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2021-12-11T13:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288337#M22326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/161073"&gt;Clinton Dow&lt;/A&gt;‌ Was this bug resolved and at what ArcGIS version? It would be great to know. I just ran into it on ArcGIS 10.4.1 and lost a few hours trying to figure out what was happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2020 22:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288337#M22326</guid>
      <dc:creator>StephenKaranja</dc:creator>
      <dc:date>2020-06-28T22:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288338#M22327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- python 3.10, arcpy 2.6 beta 2&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; datetime &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime
list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1908941284840&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908942659400&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908930535160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1381901040&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1908941284840&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908942659400&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1908930535160&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1381901040&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- looks good&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288338#M22327</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-11T13:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288339#M22328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info! Would you know at what version of ArcGIS this bug was fixed? In any case, I'll endeavor to upgrade to the latest version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2020 00:03:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288339#M22328</guid>
      <dc:creator>StephenKaranja</dc:creator>
      <dc:date>2020-07-04T00:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288340#M22329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but I think shortly after it was discovered.&amp;nbsp; I don't remember it being an issue for a few years&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2020 01:04:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288340#M22329</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-07-04T01:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288341#M22330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just experienced this issue on ArcGIS Pro 2.5.2 (i.e. Python v 3).&amp;nbsp; I only discovered it after getting the "now()" error and then manually moving my "from datetime import datetime" statement until i figure out it was the arcpy import that was clobbering it.&amp;nbsp; So maybe not fixed, unless i'm doing something wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2020 01:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288341#M22330</guid>
      <dc:creator>DamonPettitt</dc:creator>
      <dc:date>2020-09-18T01:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288342#M22331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm. I always import arcpy last&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; datetime &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime

n &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

n
datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2020&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;17&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;22&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;43&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;827042&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

n1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

n1
datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2020&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;17&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;22&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;770167&lt;/SPAN&gt;&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;/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288342#M22331</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-11T13:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288343#M22332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So slight wrinkle.&amp;nbsp; It doesn't have the issue when you're using the interactive python window in Pro, but it DOES have the issue when using in a standalone script.&amp;nbsp; I'm using the propy.bat to run the script from a windows scheduled task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2020 02:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288343#M22332</guid>
      <dc:creator>DamonPettitt</dc:creator>
      <dc:date>2020-09-18T02:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy tramples datetime import</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288344#M22333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a suggestion, I rarely &lt;STRONG&gt;import arcpy&amp;nbsp;&lt;/STRONG&gt;If I need something from the arcpy stable, I usually narrow down the import to the area that I need.&amp;nbsp; The folder structure can be found in your install base folder&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\arc_pro\Resources\ArcPy\arcpy&lt;/STRONG&gt;&amp;nbsp; where&amp;nbsp;&lt;SPAN&gt;arc_pro is my install folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Some things like the arcgis module and the arcgisscripting module can be found in site-packages&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\arc_pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a blanket import of arcpy isn't recommended unless you need to access a wide variety of things from it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2020 02:22:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-tramples-datetime-import/m-p/288344#M22333</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-09-18T02:22:51Z</dc:date>
    </item>
  </channel>
</rss>

