Only show daily notes from the current week

What I’m trying to do

My folder structure is the following:

Daily Notes / 2023 / Week 38 / {notes here}

Now, i have a “home” page which displays some stats and I would like to extend it with a short dataview list that displays only the daily notes from the current Week. I am really new to Obsidian, I played around with dataview for the first time today and i don’t seem to get anywhere.

Help would be really appreciated, thanks!

This is all i have, i know its nothing ^^’

TABLE 
WHERE contains(file.tags, "#dailynotes")
SORT file.name asc
TABLE 
FROM #DailyNote 
WHERE file.cday >= date(today) - dur(7 days)
SORT file.cday
1 Like

How about these?

LIST
FROM "Daily Notes"
WHERE file.day.year = date(today).year AND file.day.weekyear = date(today).weekyear
LIST
FROM "Daily Notes"
WHERE dateformat(file.day, "yyyy-WW") = dateformat(date(today), "yyyy-WW")

I think file.cday is not perfect because a daily note can be created on a different day from the day in its title.

Also the interpretation of “the current week” seems to differ between @myhatma and me, so you can choose the one you like. If you like @myhatma 's, then you can replace the WHERE part with

WHERE file.day > date(today) - dur(7 days)
2 Likes

Aye, prefer yours as you say depends when the dailynote was created!

2 Likes

Thank you very much to both of you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.