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.
WHERE file.created.day = this.file.day
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.
- These are the date settings in the Dataview plugin Options:
- I also had before:
- I even changed in MacOS the date format to be YYYY-MM-DD
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 for your help in advance.
Dataview’s documentation on
Only available if the file has a date inside its file name (of form yyyy-mm-dd or yyyymmdd), or has a Date field/inline field.
(I think it’s a typo and it should be yyyy-MM-dd or yyyyMMdd)
Are you sure your daily note’s title is properly formatted like
If not, consider using
WHERE file.cday = date(this.file.name, "Your daily note title format here") instead.
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.
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.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.