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")
I’m not quite sure I’m following this last step related to week notes, but dateformat() requires a full date not just a partial date as given using something like “2023-W48”. However, we could use date(text, format) to transform it. So try doing:
WHERE dateformat( date(Scheduled, "kkkk-'W'W"), "yyyy-Qq" ) = this.file.name
Or is it the file.name which could become 2023-W48 so you’d rather need to change that into something like: