Hi everyone,
I want to use dataview to create a list of notes from my Daily Notes that fall between two dates.
What I’m trying to do
I work in an education setting, and I want to filter my notes so that only the notes from the current term will be displayed.
My daily notes are named in the following format:
YYYY-MM-DD dddd
eg, “2024-08-01 Monday.md”
How do I use the filenames to display only the daily notes between two specific dates?
I don’t want to use the file creation time because my notes might not be created on the date of the filename.
For example, for the upcoming term I would only want to display notes that are from Jan 29th - Apr 12th.
Things I have tried
In the example below I’m trying to display notes from Jan 6th onwards as a test. Once this works I’m sure I can filter between two different dates. I’ve tried using the date function in dataview as follows:
```dataview
TABLE
FROM "Daily Notes"
WHERE date(file.name, "YYYY-MM-DD dddd") > 2024-01-06
``` (for some reason I need to enter text here to display the closing ``` correctly in this post).
However, this gives me the following error:
Dataview: Every row during operation ‘where’ failed with an error; first 3:
- Can’t handle format (YYYY-MM-DD dddd) on date string (2023-01-05 Thursday)
- Can’t handle format (YYYY-MM-DD dddd) on date string (2023-01-06 Friday)
- Can’t handle format (YYYY-MM-DD dddd) on date string (2023-01-09 Monday)
Thanks in advance!