Or this: right("string",4) in ('2022','2023','2024') Árni Geirsson *Alta ehf* // +354 582 5003 // +354 897 9549
On Wed, 12 Jun 2024 at 19:07, chris hermansen via QGIS-User < qgis-user@lists.osgeo.org> wrote: > Jeremy, list; > > On Wed, Jun 12, 2024 at 11:40 AM Jeremy Swarm via QGIS-User < > qgis-user@lists.osgeo.org> wrote: > >> I have a set of vectors (it's a parcel map) from my county. This layer >> has a number of attributes defined. I would like to filter the features by >> an attribute called "DateSale". it is formatted MM/DD/YYYY. I believe it is >> astring. I would like to find features which end with any of >> 2021,2022,2023, ,or 2024. I have not been able to build a successful filter >> with the query builder. >> >> You don't say why you "believe" it is a string. You can check the field > types... > > Anyway, in case it's a date, you can use the year function in the query > builder e.g. year(DateSale) > > -- > Chris Hermansen · clhermansen "at" gmail "dot" com > > C'est ma façon de parler. > _______________________________________________ > QGIS-User mailing list > QGIS-User@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user