Tasks due “today” based on Daily Note, not current 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.

1 Like