<?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 File Geodatabase API ExecuteSQL with Datetime condition in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-api-executesql-with-datetime/m-p/325604#M551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm trying to execute and SQL query with datetime condition on a geodatabase, but an Exception ('&lt;STRONG&gt;An invalid SQL statement was used.&lt;/STRONG&gt;') is thrown. The code is bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;var sqlStatement = "SELECT * FROM TableName &lt;STRONG&gt;WHERE Edited &amp;gt; '15.9.2014 14:28:58'&lt;/STRONG&gt;";&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;foreach (Row row in geodatabase.ExecuteSQL(sqlStatement))&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;var temp = row.GetGlobalID();&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Console.Write(temp);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Okay, there is someting wrong with SQL statement (the WHERE part), but how can I write it correctly? I there a problem in Datetime format? Or is that kind of query even possible with File Geodatabase API (using version 1.3)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 13:04:19 GMT</pubDate>
    <dc:creator>KarelVondracek</dc:creator>
    <dc:date>2014-09-15T13:04:19Z</dc:date>
    <item>
      <title>File Geodatabase API ExecuteSQL with Datetime condition</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-api-executesql-with-datetime/m-p/325604#M551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm trying to execute and SQL query with datetime condition on a geodatabase, but an Exception ('&lt;STRONG&gt;An invalid SQL statement was used.&lt;/STRONG&gt;') is thrown. The code is bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;var sqlStatement = "SELECT * FROM TableName &lt;STRONG&gt;WHERE Edited &amp;gt; '15.9.2014 14:28:58'&lt;/STRONG&gt;";&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;foreach (Row row in geodatabase.ExecuteSQL(sqlStatement))&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;var temp = row.GetGlobalID();&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Console.Write(temp);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Okay, there is someting wrong with SQL statement (the WHERE part), but how can I write it correctly? I there a problem in Datetime format? Or is that kind of query even possible with File Geodatabase API (using version 1.3)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 13:04:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-api-executesql-with-datetime/m-p/325604#M551</guid>
      <dc:creator>KarelVondracek</dc:creator>
      <dc:date>2014-09-15T13:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: File Geodatabase API ExecuteSQL with Datetime condition</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-api-executesql-with-datetime/m-p/325605#M552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"SELECT * FROM TableName &lt;STRONG&gt;WHERE Edited &amp;gt; date '15.9.2014 14:28:58'&lt;/STRONG&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 15:50:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-api-executesql-with-datetime/m-p/325605#M552</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2014-09-15T15:50:29Z</dc:date>
    </item>
  </channel>
</rss>

