I would like to query a feature classes date range. For instance, if there is data within a 2 day range then I would like to print true or do something else. I thought arcpy.Exist would do the job, but I am missing something here. I guess my arcpy.Exist is only seeing if the variable exists, how would I check to see if the actual where clause is True for my feature layer?
<SPAN class="pln" style="color: #000000;">query </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">MakeFeatureLayer_management</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">fc</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"QueryLayer"</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"""Date BETWEEN '2014-02-16 16:53:25' AND '2014-02-17 18:53:25'"""</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;"><BR /><BR /><BR /></SPAN><SPAN class="kwd" style="color: #8a4a0b;">try</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"><BR /> query<BR /><BR /></SPAN><SPAN class="kwd" style="color: #8a4a0b;">finally</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">if</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">Exists</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">query</SPAN><SPAN class="pun" style="color: #145680;">):</SPAN><SPAN class="pln" style="color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">print</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"true"</SPAN><SPAN class="pln" style="color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">else</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">print</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"no data"</SPAN>