<?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: Date Query within a File GDB for the last month in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/date-query-within-a-file-gdb-for-the-last-month/m-p/698654#M39661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most SQL code related to dates will not work across databases, so even if that query worked with one enterprise geodatabase, it's unlikely to work with any others.&amp;nbsp; Since file geodatabase doesn't even have a database to lean on for date functions, there isn't much to work with here at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't specified the language you are using, so it's difficult to give specific direction, but what you'll need to do is use your query interface to structure a start time and a stop time, then query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; created_date &amp;gt;= START_TIME and created_date &amp;lt; STOP_TIME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2015 13:29:24 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2015-06-18T13:29:24Z</dc:date>
    <item>
      <title>Date Query within a File GDB for the last month</title>
      <link>https://community.esri.com/t5/data-management-questions/date-query-within-a-file-gdb-for-the-last-month/m-p/698653#M39660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to set up a expression within a File GDB that selects all the new features created in the last month. I want to find all the new services/valves that where created in the last month. I have successfully found how to query the last month in a SDE environment but not within a File GDB. The syntax is different for a File GDB and I can't seem to find documentation to help.&lt;/P&gt;&lt;P&gt;I want to automate this selection through modelbuilder then export to a script and then run on windows scheduler. Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the logic is something like this (Which works in a SDE environment but not on a file GDB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year( created_date)=year(CURRENT_TIMESTAMP) and month(created_date)=month(CURRENT_TIMESTAMP)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 12:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/date-query-within-a-file-gdb-for-the-last-month/m-p/698653#M39660</guid>
      <dc:creator>JonahWaterman</dc:creator>
      <dc:date>2015-06-18T12:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date Query within a File GDB for the last month</title>
      <link>https://community.esri.com/t5/data-management-questions/date-query-within-a-file-gdb-for-the-last-month/m-p/698654#M39661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most SQL code related to dates will not work across databases, so even if that query worked with one enterprise geodatabase, it's unlikely to work with any others.&amp;nbsp; Since file geodatabase doesn't even have a database to lean on for date functions, there isn't much to work with here at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't specified the language you are using, so it's difficult to give specific direction, but what you'll need to do is use your query interface to structure a start time and a stop time, then query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; created_date &amp;gt;= START_TIME and created_date &amp;lt; STOP_TIME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 13:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/date-query-within-a-file-gdb-for-the-last-month/m-p/698654#M39661</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-06-18T13:29:24Z</dc:date>
    </item>
  </channel>
</rss>

