Dataview query dailynotes in weekly notes

What I’m trying to do

I’m trying to query in a weekly note all the daily notes for that week (not the next 7 days). In the weekly note I have two properties for the start and the end of the week (from journals plugin) and I’d like to be able to tell dataview to get only the notes that fall between the start and end of the week

Things I have tried

This is the query in the weekly note:

TABLE WITHOUT ID  
file.link as Date,  
choice(words_written > 660, "🟩", "🟥") as Written,
choice(reading > 30, "🟩", "🟥") as Readings
FROM "DAILY/DAILY"
WHERE file.title <= this.file.journal-start-date AND file.title >= this.file.journal-end-date
SORT file.day ASC

file.title is the daily note title (YYYY-MM-DD)
journal-start/end-date is a property in the weekly note (YYYY-MM-DD)
I guess that the syntax in the “where” clause is incorrect, but is it possible something like that? I.e. : can I filter the file title against the start and end dates of the weekly notes? Or, if it’s not possible how to achieve the same result in a different way?
Thanks!

Try replacing your WHERE clause like this

WHERE file.day >= date(this.journal-start-date) AND file.day <= date(this.journal-end-date)

Thanks Mephi, it worked perfectly !

1 Like

You’re welcome.
Would you be so kind to mark the post as solution to close the thread properly.

Yeah sorry, thanks again

1 Like