Filter tasks that have been completed on the day the note was created

I have a template for daily notes. And in this template at the end I would like to be able to filter by the tasks I have completed that day.

If I put “done today”, obviously the next day if I enter the note, I will not see the tasks completed that day, but those of the day in which I am.

Is there any way to get the date the note was created, something like the {{date}} to be changed from code to text when the note is created.
Or maybe with a statement like this, but that takes the date out of the note: path includes {{query.file.path}}

Thanks

Thank you all!
I found the solution in this POST that was not working for me because it had to be applied in a template the next day:

Regards