Setup a kind of MOC for daily notes, splitted by month. For example I want an H2 for the year, and an H3 for the month. The problem seems to be that the dataview doesn’t recognize the H3 sub-level. The queries below return the exact same result.
Things I have tried
Here’s what I have in my Daily note MOC
> ## 2024
> ### Octobre
> ```dataview
> list from ""
> where contains(file.outlinks, [[Daily notes MOC#2024#Octobre]])
> sort file.mtime desc
> ```
> ### Septembre
> ```dataview
> list from ""
> where contains(file.outlinks, [[Daily notes MOC#2024#Septembre]])
> sort file.mtime desc
> ```
In my daily notes (for october) I put a
Parent: [[Daily notes MOC#2024#Octobre]]
and a #Septembre for september
But it doesn’t matter if i put September or October in the link.
I think that incoming links & outgoing links are determined on a file basis and not a subheading basis. Try creating a separate note for September 2024 and October 2024 and update the links within your daily notes to see if that works.
You can also try using Dataview to parse the file names as dates. Try the below. Change the “2024-09” as needed for year and month.
```dataview
LIST
WHERE dateformat(date(file.name,"yyyy-MM-dd"),"yyyy-MM") = "2024-09"
SORT file.mtime desc
```
You can also have Dataview generate an indented bulleted list of your notes. This would eliminate the need for you to create your own subheadings each month. The below example pulls all notes from 2024.
```dataview
LIST rows.file.link
WHERE dateformat(date(file.name,"yyyy-MM-dd"),"yyyy") = "2024"
GROUP BY dateformat(Created, "MMM yyyy") as "Month"
SORT date(Month,"MMM yyyy") desc, file.mtime desc
```