I am struggling getting my definition expression to work with a time aware field. I believe I have narrowed down the problem to the layer.definitionExpression. I have successfully made a definition expression for a text field:
layer.definitionExpression = "project_type = 'SUP'"
but I have been unsuccessful in writing one for a time aware field. Should I be using the field name {project_date} or 'time'?
timeSlider<SPAN class="punctuation token">.</SPAN><SPAN class="token function">watch</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"timeExtent"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// only show earthquakes happened up until the end of</SPAN>
<SPAN class="comment token">// timeSlider's current time extent.</SPAN>
<SPAN class="comment token">//defExp = layer.definitionExpression = "time = " + timeSlider.timeExtent.end.getTime();</SPAN>
<SPAN class="comment token">//defExp = layer.definitionExpression = "project_type = 'SUP'";</SPAN>
<SPAN class="comment token">//defExp = layer.definitionExpression = "time=1571202000000";</SPAN>
defExp <SPAN class="operator token">=</SPAN> layer<SPAN class="punctuation token">.</SPAN>definitionExpression <SPAN class="operator token">=</SPAN> <SPAN class="string token">"time="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="number token">1571202000000</SPAN><SPAN class="punctuation token">;</SPAN>
defExp2 <SPAN class="operator token">=</SPAN> layer<SPAN class="punctuation token">.</SPAN>definitionExpression <SPAN class="operator token">=</SPAN> <SPAN class="string token">"project_date="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="number token">1571202000000</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//checks definitonExpression </SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN>defExp<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN>defExp2<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I know that the epoch time 1571202000000 exists in my dataset because I can query it in the rest end point and the query yields 2 results, however that doesn't seem directly translate to JS. Can some one please help me.

