Using Daily Note and Dataview, how to create a new daily note with the static calculated date in dataview query?

What I’m trying to do

I would like to create my daily note having dataview block of my tasks what’s over due, what’s due today and what completed today.

I started with something like this:

TASK WHERE !fullyCompleted and due = date("{{date}}")
SORT due asc

But that block is copied exactly the same to my daily note.
My expectation is that the template code gets executed and the daily note gets the following:

TASK WHERE !fullyCompleted and due = date("2024-05-07")
SORT due asc

And so on, every day that I click on daily note.

It is possible to get a template to achieve this?
The problem is that I don’t want to modify the daily note every day to put the exact value. If I let the {{date}} then tomorrow will show data using tomorrow’s date, want my notes to keep the state and don’t refresh based on the changing condition.

Things I have tried

I found at least one thread with a similar question, but not helping me to get closer:

I’d try something like this:


dateOfTemplateInstanciation: {{date}}

```dataview
TASK WHERE !fullyCompleted and due = this.dateOfTemplateInstanciation
SORT due asc
```

(Of course you can name the property dateOfTemplateInstanciation however you like, and you can also put it in the frontmatter)

It’s a bit hacky, but I don’t know if there’s better, maybe the templater add-on has something for it

Thank you!
I added the “date” property in my daily note template and that’s it! this.date in the dataview block