How to reproduce Dataviews file.mday = this.file.day in Bases

I’m trying to rebuild a Dataview query in Bases. The query shows all files modified at the date of the daily note. My Dataview query is:

TABLE WHERE file.mday = this.file.day
WHERE file != this.file
SORT file.name ASC

Where I stumble is how to create the file.mday = this.file.day filter.
Thanks!

If your daily note has the format YYYY-MM-DD, then you can use a filter like the following:

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - file.mtime.format("YYYY-MM-DD") == this.file.name
    order:
      - file.name
      - file.mtime
    sort:
      - property: file.mtime
        direction: DESC
```

In my vault, this showed me all files modified on the date matching the current file’s name:

If your daily note has a different format, then replace “YYYY-MM-DD” with one that matches.

That was exactly what I was looking for. Thanks a lot @Craig

1 Like

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