<?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: Calculate Time Difference - NOT YET ANSEWERED in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158441#M12141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where is datetime imported?&amp;nbsp; I don't see it anywhere it may not have even completed that line and flagged an error on the arcpy instead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Apr 2016 22:41:28 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-04-27T22:41:28Z</dc:date>
    <item>
      <title>Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158433#M12133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #303030;"&gt;I have a python script that used to work to calculate difference in dates outputting the result in days. It worked fine since last week until we migrated to 10.4. To my understanding, this should not matter but just as en extra info.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #a5c261;"&gt;(datetime.datetime.now() - arcpy.time.ParseDateTimeString( !DATE! )).days&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;The following error is returned:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;Executing: CalculateField gishw.PU.MapChangeRequest Time_Diff (datetime.datetime.now() - arcpy.time.ParseDateTimeString( !DATE! )).days PYTHON_9.3 #&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;Start Time: Wed Apr 27 10:24:54 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;ERROR 000539: Error running expression: (datetime.datetime.now() - arcpy.time.ParseDateTimeString( u"4/26/2016 4:10:00 PM" )).days &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;&amp;nbsp; File "&amp;lt;expression&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;NameError: name 'arcpy' is not defined&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;Failed to execute (CalculateField).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #505050;"&gt;Failed at Wed Apr 27 10:24:54 2016 (Elapsed Time: 0.13 seconds)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #303030;"&gt;Any assistance will be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158433#M12133</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2016-04-27T14:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158434#M12134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to import arcpy, particularly if you are working in a python ide outside of arcmap&lt;/P&gt;&lt;P&gt;add this line to code&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;if it errors out, then the installation isn't correct&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:34:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158434#M12134</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-27T14:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158435#M12135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I am working on a python IDE. When executed from the IDE, it says in runs but the record is not updated in the Time_Diff field. That is why I went to the field calculator to just test the script which was working last week. This is a simple script that used to update one of the widgets in a dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080;"&gt;# Import arcpy module
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; font-weight: bold;"&gt;import &lt;/SPAN&gt;arcpy

conn = &lt;SPAN style="color: #a5c261;"&gt;r"C:\Users\gispu\Documents\GIS_Python_Scripts\Map_Change_Request\GISHW.sde"
&lt;/SPAN&gt;arcpy.env.workspace = conn

&lt;SPAN style="color: #808080;"&gt;# Local variables:
&lt;/SPAN&gt;Input_MapChangeRequest = &lt;SPAN style="color: #a5c261;"&gt;r"C:\Users\gispu\Documents\GIS_Python_Scripts\Map_Change_Request\GISHW.sde\gishw.PU.HW_FieldCollection\gishw.PU.MapChangeRequest"
&lt;/SPAN&gt;MapChangeRequest_Layer = &lt;SPAN style="color: #a5c261;"&gt;"PU.MapChangeRequest_Layer"
&lt;/SPAN&gt;MapChangeRequest_Layer2 = MapChangeRequest_Layer
PU_MapChangeRequest_Layer = MapChangeRequest_Layer2

&lt;SPAN style="color: #808080;"&gt;# Process: Make Feature Layer
&lt;/SPAN&gt;arcpy.MakeFeatureLayer_management(Input_MapChangeRequest&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;MapChangeRequest_Layer)

&lt;SPAN style="color: #808080;"&gt;# Process: Select Layer By Attribute
&lt;/SPAN&gt;arcpy.SelectLayerByAttribute_management(MapChangeRequest_Layer&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"STATUS = 'Open' OR STATUS = 'Validation'"&lt;/SPAN&gt;)

&lt;SPAN style="color: #808080;"&gt;# Start an edit session. Must provide the workspace.
&lt;/SPAN&gt;edit = arcpy.da.Editor(conn)

&lt;SPAN style="color: #808080;"&gt;# Edit session is started without an undo/redo stack for versioned data
&lt;/SPAN&gt;edit.startEditing(&lt;SPAN style="color: #8888c6;"&gt;True&lt;/SPAN&gt;)

&lt;SPAN style="color: #808080;"&gt;# Start an edit operation
&lt;/SPAN&gt;edit.startOperation()

&lt;SPAN style="color: #808080;"&gt;# Process: Calculate Field
&lt;/SPAN&gt;arcpy.CalculateField_management(Input_MapChangeRequest&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"Time_Diff"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"(datetime.datetime.now() - arcpy.time.ParseDateTimeString( !DATE! )).days"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"PYTHON_9.3"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;""&lt;/SPAN&gt;)

&lt;SPAN style="color: #808080;"&gt;# Stop the edit operation.
&lt;/SPAN&gt;edit.stopOperation()

&lt;SPAN style="color: #808080;"&gt;# Stop the edit session and save the changes
&lt;/SPAN&gt;edit.stopEditing(&lt;SPAN style="color: #8888c6;"&gt;True&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: 2016-04-28&lt;/P&gt;&lt;P&gt;The above script is good and works as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158435#M12135</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2021-12-11T08:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158436#M12136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ernesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you import arcpy into your Field Calculator? I see it in your stand alone script but I am wondering about the field calculator portion. Or is the exact script above the same you used in Field Calculator?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158436#M12136</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2016-04-27T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158437#M12137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, the arcpy module was not imported when using the Field Calculator. If needed, can you provide an example of how to? BTW, I found it odd that it is needed since I already tested it before within the Field Calculator wand I don't recall adding the import module part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158437#M12137</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2016-04-27T14:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158438#M12138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ernesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just add it to the top of the code block scripting area like you would in a standalone script. Here are some examples:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-field.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-field.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Calculate Field—Data Management toolbox | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="kn" style="color: blue; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="nn" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;
&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;env&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;workspace&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"C:/data"&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;/SPAN&gt;
&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;AddField_management&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"vegtable.dbf"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"VEG_TYP2"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"TEXT"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;""&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;""&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"20"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;/SPAN&gt;
&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;CalculateField_management&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"vegtable.dbf"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"VEG_TYP2"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;'!VEG_TYPE!.split(" ")[-1]'&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"PYTHON_9.3"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I have not tested this. I am just kind of going off of the documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158438#M12138</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2021-12-11T08:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference - NOT YET ANSEWERED</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158439#M12139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using the field calculator and not the calculate field tool, there should be no need to import arcpy.&amp;nbsp; Also I see that sde is involved... this is about the 12 post this week with issues of calculating stuff in files that reside or are destined to sde.&amp;nbsp; I wonder if it is just the week, or some bigger issue going on with the explanations in the documentation.&amp;nbsp; Try working local, store remotely in the short term.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:37:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158439#M12139</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-27T17:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference - NOT YET ANSEWERED</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158440#M12140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info... I was just checking out your blog &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to run the same process with a File GDB in order to isolate the issue. If it does work, I will report it here for the record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158440#M12140</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2016-04-27T17:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference - NOT YET ANSEWERED</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158441#M12141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where is datetime imported?&amp;nbsp; I don't see it anywhere it may not have even completed that line and flagged an error on the arcpy instead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 22:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158441#M12141</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-27T22:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference - NOT YET ANSEWERED</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158442#M12142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue solved. The script was working but for some reason the field storing the &lt;EM&gt;time difference&lt;/EM&gt; got renamed with an underscore at the end. After removing it, the script is working as expected. The &lt;EM&gt;datetime&lt;/EM&gt; module was not required since it is included as part of the python functions within the Field Calculator GUI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your assistance Dan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 12:31:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158442#M12142</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2016-04-28T12:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time Difference - NOT YET ANSEWERED</title>
      <link>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158443#M12143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good to know about datetime in the ArcMap gui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 12:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-time-difference/m-p/158443#M12143</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-28T12:37:18Z</dc:date>
    </item>
  </channel>
</rss>

