Skip to content

Instantly share code, notes, and snippets.

@wuhland
Last active January 20, 2016 16:58
Show Gist options
  • Save wuhland/1b8caac8cb3c0e67b1a9 to your computer and use it in GitHub Desktop.
Save wuhland/1b8caac8cb3c0e67b1a9 to your computer and use it in GitHub Desktop.
QGIS: Query By Date
  1. In QGIS ensure that the date field is saved as type 'QDate' by looking at properties:Fields on the layer

  2. Open the attribute layer and toggle the show all features selection in the bottom left corner to Advanced Filter to open the expression based filter toolbar. Alternatively you can press CTRL+F to get to the expression based filter toolbar.

  3. Enter an appropriate filter. The one I used to filter the last 90 days of records looks like this:

 day(age( $now,"EVENT_DATE" )) <= 90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment