[Qgis-user] How to filter features by date

Zoltan Szecsei zoltans at geograph.co.za
Tue Jul 15 23:22:14 PDT 2014


Hi,
On 2014/07/16 06:00, Mark Coletti wrote:
> I have an attribute type of "QDate" and I wish to filter out features 
> that are older than a given date.  However I cannot seem to come up 
> with the right magical incantation in the qgis filter to do so.
>
> I do the following:
>
> 1. right-click on the vector layer and select "Filter ..."; the Query 
> Builder dialog appears
> 2. In the expression field I write:
>
> "SampleTime" <= "2011/07/01"
Try double quotes for "Fields" and single quotes for 'values'

Regards,
Zoltan
>
> For which I get the following error:
>
> An error occurred when executing the query.
>
> The data provider said:
>
> OGR[3] error 1: Type mismatch or improper type of arguments to <= 
> operator.
>
>
> So how do I get this to work?
>
> Thanks!
>
> Mark
> -- 
> mcoletti at gmail.com <mailto:mcoletti at gmail.com>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user


-- 

===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services

P.O. Box 7, Muizenberg 7950, South Africa.

Mobile: +27-83-6004028
Fax:    +27-86-6115323     www.geograph.co.za
===========================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140716/190b9c2c/attachment.html>


More information about the Qgis-user mailing list