I'm trying to filter some data of a shapefile (with "Filter") for QGIS to show points in a date interval of a shapefile. I have a shapefile which has a table of attributes of sightings of animals with time and date and other attributes relevant for me. I'm now trying to create shape files of each month, I do a query using the "Filter" and I can't seem to do it. I used to be able to do it; don't know if something changed or if I'm doing it the wrong way! Something really basic but it is puzzling me and I couldn't find any way that worked in here.
QGIS and the shapefile format both use
'yyyy-mm-dd' as date object string format, so I'm pretty sure you are working with plain strings. You'd need to confirm, though.
Assuming that, you could use
to_int(substr("Date", 4, 2)) to extract the month as integer.
From here, you could either filter the shapefile data on that (or create a new field or whatever), i.e.:
to_int(substr("Date", 4, 2)) = 11
or, and I would possibly go that way, create a categorized symbology with
to_int(substr("Date", 4, 2)) as Column expression. You can then selectively switch the month in question on and off via Symbology (in the Layers panel, even) and create a map composer export for each...provided that is what you had in mind.
In either way, don't pollute your disk with a bunch of unnecessary extra files; I would almost always recommend to implement sorting/grouping/categorizing logic as part of the data itself, not via file system (chaos).