Quarterly note using dataview to extract all notes created in the 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 created a quarterly note using the Periodic Notes plugin (i did this on 1/1/24). I then used dataview to extract notes that were created during the quarter. The problem is the extraction is pulling notes from the prior quarter (2023-Q4), not the current quarter (2024-Q1)

Things I have tried

Here is my dataview query to extract the montly notes from the quarter.

FROM "Journal/Monthly"
WHERE file.cday.quarter = this.file.cday.quarter

Well, it seems like your file has a creation date of the previous day. One way to counter it, is to recreate the file, or even better to set a date property within the quarterly note, and use that in your query through file.day.quarter.

Thanks for the reply! The file was created 1/1, then I deleted it and created it 1/2, deleted and created again 1/3. The query is bringing up months from Jan, Dec, Nov, Oct. It’s almost like dataview doesn’t recognize quarter in it’s formula. If Dataview doesn’t recognize quarter, then I’ll probably have to just enter the months that I want included in the query i.e. YYYY-MM. Was hoping to automate it.

Ehh… Which version of dataview are you using? I can’t get file.cday.quarter to return anything, meaning that you query is essentially returning every file in your FROM selection…

See this for which variants are actually legal. If you want to extract the correct quarter you need to use dateformat().

So try the following query:

FROM "Journal/Monthly"
WHERE dateformat(file.cday, "yyyy-Qq") = dateformat(this.file.cday, "yyyy-Qq")
SORT file.cday asc

That worked! Thank you very much for your help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.