Dataview query to display notes with a deadline during a quarter

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

I am trying to create a dataview query that displays all files with a deadline that falls during a given quarter. Each of the files has a deadline for a month during that quarter. The name of the file is the quarter. So for example example, I’ll have a file named 2023-Q4, and I want it to show files with a deadline 2023-10, 2023-11, and 2023-12.

Things I have tried

So far I have tried using date format without much luck. Here is my query so far:

dataview
TABLE dateformat(date(Scheduled), "q") AS Scheduled
WHERE dateformat(date(Scheduled) = dateformat(date(this.file.name), "q")

What format are you using for Scheduled?

If it’s in the recognised format of YYYY-MM-DD, then your statement should rather look like:

WHERE dateformat(Scheduled, "yyyy-Qq") = this.file.name