<?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 Using DateDiff() Function in ArcGIS Field Calculator in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/using-datediff-function-in-arcgis-field-calculator/m-p/632581#M35727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to calculate the time difference between two fields using the DateDiff() function in minutes. I have successfully calculated the times that fall within the same day but I am having trouble with the times that are occurring in day transition (after 11:59 PM). For example: My date fields are as such,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MM\dd\yyyy hh:mm:ss tt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So between these two times&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;01\17\2007 11:57:08 PM and 01\18\2007 12:15:01 AM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The field calculator would apply a huge negative number. I am thinking a conditional statement is needed for basic arithmetic but am at a loss.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please be as detailed as possible. I am not a developer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Apr 2014 19:39:06 GMT</pubDate>
    <dc:creator>deleted-user-hRYE8PyiQDa5</dc:creator>
    <dc:date>2014-04-18T19:39:06Z</dc:date>
    <item>
      <title>Using DateDiff() Function in ArcGIS Field Calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/using-datediff-function-in-arcgis-field-calculator/m-p/632581#M35727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to calculate the time difference between two fields using the DateDiff() function in minutes. I have successfully calculated the times that fall within the same day but I am having trouble with the times that are occurring in day transition (after 11:59 PM). For example: My date fields are as such,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MM\dd\yyyy hh:mm:ss tt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So between these two times&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;01\17\2007 11:57:08 PM and 01\18\2007 12:15:01 AM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The field calculator would apply a huge negative number. I am thinking a conditional statement is needed for basic arithmetic but am at a loss.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please be as detailed as possible. I am not a developer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 19:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/using-datediff-function-in-arcgis-field-calculator/m-p/632581#M35727</guid>
      <dc:creator>deleted-user-hRYE8PyiQDa5</dc:creator>
      <dc:date>2014-04-18T19:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using DateDiff() Function in ArcGIS Field Calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/using-datediff-function-in-arcgis-field-calculator/m-p/632582#M35728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The formula I am using is: DateDiff("s", Field1, Fields). The problem with different days is mentioned above. The DateDiff() function doesn't "consider the date when it looks at the hh:mm:ss tt section of the field's row values. In using my example above, when DateDiff() calculates the number of seconds between 11:57:08 PM and 12:15:01 AM the calculation looks like this: 12:15:01 AM subtract 11:57:08 PM. If you looked at it in military time 00:15:01 - 23:57:08 or 901 seconds subtract 86222 seconds or 901-86222 = -85321. The answer is -85321. I know how to do this in Excel, not ArcGIS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 01:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/using-datediff-function-in-arcgis-field-calculator/m-p/632582#M35728</guid>
      <dc:creator>deleted-user-hRYE8PyiQDa5</dc:creator>
      <dc:date>2014-04-19T01:09:06Z</dc:date>
    </item>
  </channel>
</rss>

