<?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 layerdefinition and timestamp in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188951#M4412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Attempting to apply a layer definition through the flex api to an ArcGISDynamicMapLayer.&amp;nbsp; Target layer is on postgresql/SDE.&amp;nbsp; For some reason, I can use the "date" function successfully, but not the "timestamp" function.&amp;nbsp; Here's the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var wwaLyr:ArcGISDynamicMapServiceLayer = map.getLayer("WWA") as ArcGISDynamicMapServiceLayer;

var stringDef:String = "beginDate &amp;lt;= timestamp'2010-03-11 19:50:00'"; //This does not work
var stringDef:String = "beginDate &amp;lt;= date'2010-03-11'"; //This works

wwaLyr.layerDefinitions = [stringDef];
wwaLyr.refresh();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on why TIMESTAMP is not working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Parks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tallahassee&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2011 13:10:49 GMT</pubDate>
    <dc:creator>ParksCamp</dc:creator>
    <dc:date>2011-03-15T13:10:49Z</dc:date>
    <item>
      <title>layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188951#M4412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Attempting to apply a layer definition through the flex api to an ArcGISDynamicMapLayer.&amp;nbsp; Target layer is on postgresql/SDE.&amp;nbsp; For some reason, I can use the "date" function successfully, but not the "timestamp" function.&amp;nbsp; Here's the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var wwaLyr:ArcGISDynamicMapServiceLayer = map.getLayer("WWA") as ArcGISDynamicMapServiceLayer;

var stringDef:String = "beginDate &amp;lt;= timestamp'2010-03-11 19:50:00'"; //This does not work
var stringDef:String = "beginDate &amp;lt;= date'2010-03-11'"; //This works

wwaLyr.layerDefinitions = [stringDef];
wwaLyr.refresh();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on why TIMESTAMP is not working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Parks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tallahassee&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 13:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188951#M4412</guid>
      <dc:creator>ParksCamp</dc:creator>
      <dc:date>2011-03-15T13:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188952#M4413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What versions of ArcGIS Server and ArcGIS API for Flex are you using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 16:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188952#M4413</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-03-15T16:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188953#M4414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What versions of ArcGIS Server and ArcGIS API for Flex are you using?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using version 2.2 of the Flex API.&amp;nbsp; The service I'm consuming is running on ArcGIS Server 9.3.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Parks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 20:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188953#M4414</guid>
      <dc:creator>ParksCamp</dc:creator>
      <dc:date>2011-03-15T20:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188954#M4415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You'll need to be using a ArcGIS Server 10 hosted service since it has added a new syntax for the layerDefs parameter that allows :'s in the definition value. The old syntax uses :'s as a layer id separator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 21:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188954#M4415</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-03-15T21:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188955#M4416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You'll need to be using a ArcGIS Server 10 hosted service since it has added a new syntax for the layerDefs parameter that allows :'s in the definition value. The old syntax uses :'s as a layer id separator.&lt;BR /&gt;&lt;BR /&gt;Reference:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dasa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&amp;nbsp; That helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;parks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 22:08:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188955#M4416</guid>
      <dc:creator>ParksCamp</dc:creator>
      <dc:date>2011-03-15T22:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: layerdefinition and timestamp</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188956#M4417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You'll need to be using a ArcGIS Server 10 hosted service since it has added a new syntax for the layerDefs parameter that allows :'s in the definition value. The old syntax uses :'s as a layer id separator.&lt;BR /&gt;&lt;BR /&gt;Reference:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to find a workaround for this issue by sending the epoch time and using the sql "to_timestamp" function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var nDate:Date = new Date();
var qTime:Number = nDate.time;
var wwaLyr:ArcGISDynamicMapServiceLayer = map.getLayer("WWA") as ArcGISDynamicMapServiceLayer;

var stringDef:String = "beginDate &amp;lt;= to_timestamp(qTime)";
wwaLyr.layerDefinitions = [stringDef];
wwaLyr.refresh();

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdefinition-and-timestamp/m-p/188956#M4417</guid>
      <dc:creator>ParksCamp</dc:creator>
      <dc:date>2021-12-11T09:31:38Z</dc:date>
    </item>
  </channel>
</rss>

