whenever I open the 20th dailynote I want it to show the Exam1 (even if I open said dailynote on the 19th) and same for the 21st, 22nd etc
hence why I’m looking for a way to use Tasks’ date based on the dailynote where its called and not the actual absolute date
I see two variants to get this to work like you intend to. Either use Templater to prepulate the dates based upon your file title (or wherever you get your date from), or using dataviewjs to build the tasks query based upon that date.
Using Templater
Here @egauthier presets some variables, which he then re-uses when building the queries later on in the template. This looks like a neat and easy way to handle this type of query.
Using dataviewjs
Using the same kind of syntax as in the link above, you can do something like:
```dataviewjs
const query = `
not done
due before ${ dv.current().file.day.toFormat("yyyy-MM-dd") }
# you can add any number of extra Tasks instructions, for example:
group by heading
`;
dv.paragraph('```tasks\n' + query + '\n```');
```
Where the ${ ... } is utilising a metadata field to get the date of the file depending on either the file title or the frontmatter field date.