Hello, I would like to add the following section to my daily note template: a task query that recalls all the tasks having the daily note’s date (i.e. the daily note’s title) as due date. This would be great, as in the morning I would see all the tasks due today (completed and not) immediately when entering my vault. Also, by looking into past daily notes, I would see all the tasks (completed and not) that were associated with that day’s work.
What tried was:
due today
sort by priority
hide due date
hide backlink
show priority
which of course works pretty well with today’s tasks, but is not linked to the specific daily note’s date and therefore is not suitable for keeping a historical account of past tasks. Any ideas? How could I use the note’s title, or set a dataview TASK query?
Am not sure I fully understand your issue, as I’m quickreading today, but it seems like what you would like to do is to use fixed dates instead of the today which will keep changing as is natural.
This means that either you do something like due 2025-02-21 and use some template magic to insert the correct date. Or using the tasks plugin, I believe you can use {{query.file.name}} to get the title of the file (or something similar to that).
You can’t compare a date with a text string, so when you do the toFormat() on the first part, you need to match it with a text string, like using file.name or doing a similar formatting to make that date into a text string too.
Depending on which template engine you’re using (that is the core template or Templater plugin), you could have inserted either {{date:YYYY-MM-DD}} (I think… ) or <% tp.date.now() %> instead of today in your template.