<?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: arcpy.SearchCursor  whereClause with date field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/1087041#M61972</link>
    <description>&lt;P&gt;Hi, do you get the answer for the first part? As per me, arcpy.da.SearchCursor basically means we're accessing the data for the further use like update &amp;amp; all whereas arcpy.SearchCursor is also the same as arcpy.da.SearchCursor. So, both the things are same. Could you please tell me the answer for the first part "Use of date field data type"?&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 09:56:01 GMT</pubDate>
    <dc:creator>broy06</dc:creator>
    <dc:date>2021-08-09T09:56:01Z</dc:date>
    <item>
      <title>arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34782#M2699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I add a date field in a whereClause when using an arcpy.SearchCursor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the portion of the code I am using:&lt;/P&gt;&lt;P&gt;for&amp;nbsp; row in cur:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; whereClause = "AGMID = " + row.getValue("AGMID") + " AND DIGIDATE = " + row.getValue("DIGIDATE")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; src = arcpy.SearchCursor(AGREEMENT, whereClause)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can compare the field "AGMID = " + row.getValue("AGMID")&amp;nbsp;&amp;nbsp; but the field DIGIDATE fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34782#M2699</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2016-03-01T21:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34783#M2700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can't tell without the actual data but try .... str(row.getValue("DIGIDATE")&amp;nbsp; assuming that is how you access the date, perhaps you need to concatenate strings and the getvalue isn't returning a string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:13:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34783#M2700</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-01T21:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34784#M2701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not try to nest &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/classes/cursor.htm"&gt;old style cursors&lt;/A&gt;​ - they get confused. Instead, nest &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/searchcursor-class.htm"&gt;data access module cursors&lt;/A&gt;. Or, better yet, find a way around nesting cursors, like loading the contents of one cursor into a dictionary and referencing those values from the second cursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:31:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34784#M2701</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-03-01T21:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34785#M2702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For more information on Darren's suggestion to load the contents of a cursor into a dictionary, &lt;A href="https://community.esri.com/migrated-users/4811"&gt;Richard Fairhurst&lt;/A&gt;​ has a good blog on the topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/1885"&gt;Turbo Charging Data Manipulation with Python Cursors and Dictionaries&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34785#M2702</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-03-01T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34786#M2703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realized that my question is more general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use a date field in a whereClause&amp;nbsp; that I can reuse in a&amp;nbsp; arcpy.SearchCursor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also what is the difference between&amp;nbsp; arcpy.da.SearchCursor and&amp;nbsp; arcpy.SearchCursor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 13:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34786#M2703</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2016-03-02T13:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34787#M2704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;How can I use a date field in a whereClause&amp;nbsp; that I can reuse in a&amp;nbsp; arcpy.SearchCursor?&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;That will depend on the geodatabase (file, personal, SQL Server, Oracle, etc)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for-query-expressions-used-in-arcgis.htm#GUID-85C03D85-F4A5-48FC-8E8C-3F79919430DB" title="http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for-query-expressions-used-in-arcgis.htm#GUID-85C03D85-F4A5-48FC-8E8C-3F79919430DB"&gt;SQL reference for query expressions used in ArcGIS—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;what is the difference between&amp;nbsp; arcpy.da.SearchCursor and&amp;nbsp; arcpy.SearchCursor?&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python/data-access-using-cursors.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/python/data-access-using-cursors.htm"&gt;Accessing data using cursors—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;A new data access module (arcpy.da) was added in ArcGIS 10.1. The previously existing cursors (that are still listed under arcpy) are still functional and valid; however, the new arcpy.da cursors include significantly faster performance. In most cases, the help will illustrate the use of the arcpy.da cursors.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/34787#M2704</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-03-03T21:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/1087041#M61972</link>
      <description>&lt;P&gt;Hi, do you get the answer for the first part? As per me, arcpy.da.SearchCursor basically means we're accessing the data for the further use like update &amp;amp; all whereas arcpy.SearchCursor is also the same as arcpy.da.SearchCursor. So, both the things are same. Could you please tell me the answer for the first part "Use of date field data type"?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 09:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/1087041#M61972</guid>
      <dc:creator>broy06</dc:creator>
      <dc:date>2021-08-09T09:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor  whereClause with date field</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/1087524#M62001</link>
      <description>&lt;P&gt;Regarding:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;So, both the things are same.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Outside of arcpy.SearchCursor and arcpy.da.SearchCursor both being search cursors, the two types of cursors are nothing alike in terms of implementation and performance.&amp;nbsp; See the response/answer from Jason Scheirer on &lt;A href="https://gis.stackexchange.com/questions/108807/how-is-the-data-access-cursor-performance-so-enhanced-compared-to-previous-versi/108809" target="_blank"&gt;arcpy - How is the data access cursor performance so enhanced compared to previous versions? - Geographic Information Systems Stack Exchange&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 16:11:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-whereclause-with-date-field/m-p/1087524#M62001</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-08-10T16:11:33Z</dc:date>
    </item>
  </channel>
</rss>

