<?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 Querying against current time in Field Calculator / Def Query in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562961#M3794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's see how this new format works....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to query against current time in the Field Calculator - ideally what I'm trying to do is come up with a definition query that provides features that are greater than 3 hours old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have is a table from MS Access 2010, that is being delivered to ArcGIS via a database link. All working well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each record in the table has an X and Y which is being drawn via an event viewer - all working ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each record also has a timestamp of the time it was created. I wan to be able to separate out records that are greater than 3 hours old, so that they can be drawn in a different colour to highlight their importance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've discovered the CURRENT_TIMESTAMP SQL operator, but can't seem to get anywhere with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time field in the table is formatted as dd/mm/yyyy hh:mm:ss AM/PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is anyone able to provide some clarity on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 01:49:14 GMT</pubDate>
    <dc:creator>AnthonyCheesman1</dc:creator>
    <dc:date>2014-08-28T01:49:14Z</dc:date>
    <item>
      <title>Querying against current time in Field Calculator / Def Query</title>
      <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562961#M3794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's see how this new format works....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to query against current time in the Field Calculator - ideally what I'm trying to do is come up with a definition query that provides features that are greater than 3 hours old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have is a table from MS Access 2010, that is being delivered to ArcGIS via a database link. All working well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each record in the table has an X and Y which is being drawn via an event viewer - all working ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each record also has a timestamp of the time it was created. I wan to be able to separate out records that are greater than 3 hours old, so that they can be drawn in a different colour to highlight their importance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've discovered the CURRENT_TIMESTAMP SQL operator, but can't seem to get anywhere with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time field in the table is formatted as dd/mm/yyyy hh:mm:ss AM/PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is anyone able to provide some clarity on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 01:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562961#M3794</guid>
      <dc:creator>AnthonyCheesman1</dc:creator>
      <dc:date>2014-08-28T01:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Querying against current time in Field Calculator / Def Query</title>
      <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562962#M3795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//015400000686000000"&gt;Link 1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Supported_field_formats/005z00000006000000/"&gt;Link 2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and other links seem to use a different time format (ie starting with year).&amp;nbsp; since I rarely work with time fields and never with server stuff, I was wondering if there are differences in what is supported based upon database types/sources and how it is delivered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 03:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562962#M3795</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-08-28T03:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Querying against current time in Field Calculator / Def Query</title>
      <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562963#M3796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MS Access doe not have a classical "Timestamp".&amp;nbsp; Generally one would create a macro or function to generate this data on a record in access.&amp;nbsp; MS SQL does have a Timestamp.&amp;nbsp; If you are wanting to process or use a comparative script/sql try passing the sql using a DB Pass-through query.&amp;nbsp; This would allow you to use all MS Access functionality instead of your DSN/ODBC translations (your database link?).&amp;nbsp;&amp;nbsp; I believe you would then use the Access "Now()" function to compare the time values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is all that comes to mind at moment -- hope this can lead you somewhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 14:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562963#M3796</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2014-08-28T14:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Querying against current time in Field Calculator / Def Query</title>
      <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562964#M3797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a Def Query you may want to try something like this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select ..... where DateDiff('h','Timestampdate', now()) &amp;gt; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; (Note dates always get me confuse you may have to switch the Timestampdate and the Now() function. -- this will only work against an access database.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:19:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562964#M3797</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2014-08-28T15:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Querying against current time in Field Calculator / Def Query</title>
      <link>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562965#M3798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan, Ted. I'd forgotten about the DateDiff function until after I posted this. I couldn't get it to fire but I think that was more to do with my syntax. And after a weekend of reflection, I seem to recall using it for a project about 2 years ago, and I'm fairly sure I kept some good notes from that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So first task this morning will be to dig back through my archives.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again and I'll report back with success or otherwise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Aug 2014 20:51:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/querying-against-current-time-in-field-calculator/m-p/562965#M3798</guid>
      <dc:creator>AnthonyCheesman1</dc:creator>
      <dc:date>2014-08-31T20:51:13Z</dc:date>
    </item>
  </channel>
</rss>

