<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>hm - I found out that my query</p>
<p><span>start_time <= now() AND end_time >= now()</span></p>
<p><span>works fine if start_time, now() and end_time are on three different dates, but it fails if all are on the same day. Very strange. Anyone knows what's wrong?</span></p>
<p><span>Andreas</span></p>
<p>On 2015-11-17 16:51, Neumann, Andreas wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<p>Hi,</p>
<p>For a project I have point data for events with a start_time and end_time, both columns are of type timestamp without timezone (in PostgreSQL).</p>
<p>I want to have three different rules for events in the past, current events and future events.</p>
<p>Past and future events work fine, but I am struggling with the query for the current events.</p>
<p>I use the query</p>
<p>start_time <= now() AND end_time >= now()</p>
<p>But the query fails - the object aren't selected - even if I am sure that there are matching objects in my database. Is this not a valid query? Any other idea on how to test for current events? In PostgreSQL I could use intervals and test for overlaps - but this isn't available in QGIS.</p>
<p>Thanks for any hints,</p>
<p>Andreas</p>
<div> </div>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> Qgis-user mailing list<br /><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br /> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br /> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>