I hadn’t tried using the Periodic Notes syntax ({{monday:gggg-MM-DD ddd}}) in conjunction with Dataview before, but it seems to work over here. In addition to what holroy said, maybe your query isn’t formatted correctly? Using this in a weekly template:
#### {{monday:gggg-MM-DD ddd}}
```dataview
List
FROM ""
WHERE file.mday = date("{{monday:gggg-MM-DD}}")
SORT file.mtime asc
```
…and running the command Periodic notes: Open weekly note, I get an output of:
#### 2023-05-15 Mon
```dataview
List
FROM ""
WHERE file.mday = date("2023-05-15")
SORT file.mtime asc
```
I was going to put this in another post (may still do), but seems relevant here. Not sure if you want to try something new, but I do something similar for daily and weekly notes using Templater and Dataview to list notes created that day, but is easily adjusted to notes changed.
I use gggg-MM-[W]ww for weeklies which gives me a weekly note of 2023-05-W20. Having the month in there helps at a quick glance. Without it, I was always - “now where is week 32 in the year??”
I have Periodic Notes create the weekly note with no template.
Then use Templater to insert the template I want to use that week. (This could be done in one step with Templater, but I prefer to insert the template manually.)
A snip of my weekly Templater template looks something like this:
## **Monday** [[<% tp.date.weekday("YYYY-MM-DD", 1) %>]]
- Changed today:
```dataview
LIST
FROM ""
WHERE file.mday = date("<% tp.date.weekday("YYYY-MM-DD", 1) %>")
SORT file.mtime asc
```
## **Tuesday** [[<% tp.date.weekday("YYYY-MM-DD", 2) %>]]
- Changed today
```dataview
LIST
FROM ""
WHERE file.mday = date("<% tp.date.weekday("YYYY-MM-DD", 2) %>")
SORT file.mtime asc
```
## **Wednesday** [[<% tp.date.weekday("YYYY-MM-DD", 3) %>]]
- Changed today
```dataview
LIST
FROM ""
WHERE file.mday = date("<% tp.date.weekday("YYYY-MM-DD", 3) %>")
SORT file.mtime asc
```
This is very helpful. The important part that I was missing is that the syntax I thought was Templater date syntax belongs in fact to the Periodic Notes plugin and is only substituted when the note is created via that mechanism. Many thanks.