Filter in pdoResources


I have a few resources with dates, I want them to be displayed by month so for example.
2022-01-20 16:30:00
2022-02-10 16:30:00
2022-02-10 14:30:00

Date is a nomal TV width date. it also incl time as I am also using it else where.

I need to group them by month hence as above it would be 1x Jan and 2x Feb

Hence I want to do it using a where with json in pdoResources e.g.


Now I am not sure what is suppose to go in the where statement as it needs to be as follows

[[+etimdate:date=%m:is=01:then=Its a JAN Date]]

but how do I get the above statement into where?

Or do I use &tplCondition

for tthat and write the above into that chunk?
is there an example of this?

Dates in a TV are stored as strings in the database, so you probably can get away with a LIKE condition like this:


This should return only resources where etimdate is in february.

many thanks I was actually busy playing with the filters. learning a new thing every day…

tvfilters works :slight_smile:

Here is another solution that seems to work with pdoResources as well.

    &where=`["MONTH(etimdate) = 2"]`

ah awesome that was the one I wanted to do initially but I did not know how to format that as I could not find any documentation.

 &where=`["MONTH(etimdate) = 2"]