This is my first post, and I am thrilled to be part of the community.
I have searched for potential solutions to what seems like a very straight query, but I cannot figure out what is going wrong. I hope you can help.
What I’m trying to do
In my Daily Note template, I’d like to have a Dataview query that shows all the notes that were created on the note’s creation date.
Things I have tried
Data view query
These are the queries I’ve been trying, as well as some other alternatives to these.
LIST
WHERE file.created.day = this.file.day
LIST
WHERE file.cday = this.file.day
However, I keep on getting a full list of all my notes in Obsidian, as if the date is somehow not recognized.
Date Settings
These are the date settings in the Dataview plugin Options: yyyy-LL-dd
I also had before: yyyy-MM-dd
I even changed in MacOS the date format to be YYYY-MM-DD
YAML
Just for testing purposes, I have also created a date property, named created. I would like, if possible, to avoid having to manually fill out the created date and rather use the existing automatically generated file metadata. Anyway, even with that piece of YAML info, I still don’t manage to get just the file’s creation date notes and rather get all my notes.
Thank you @ush for quick reply. That did it , the file in which the query lives, must have the a date inside the file name. To be honest I don’t understand why only the “hosting” file of the query should have the date, the query pulls as wished also files created on the day that do not have the date on the file name, which solves my issue and is exactly what I want, I just don’t understand the principle behind the behavior
(I’m not sure if I understand your question correctly, but)
The hosting file does NOT necessarily have to contain a date in its name.
I think file.day is just utility metadata for making for us to work with daily notes easier. (You know, a daily note usually contains a date in its title)
You can query a date from elsewhere if you wish, but as for daily notes, it’s usually stored inside the note title, so file.day is designed as such.