Embed a base but with dynamic date in daily note

In bases, how can I use a formula to achieve “edited/created on this day”?

Similar to:

WHERE file.mday = date(<% tp.file.title %>)

Many thanks!

See:

and

https://forum.obsidian.md/t/bases-dont-filter-by-file-ctime-and-file-mtime-dates-using-the-simple-filter-builder/101668/6?u=ariehen

Seen these but not entirely sure how they answer my case, hence the question.

Give these a try using the Advanced filter:

Created today (host note being YYYY-MM-DD)

  • this.file.name == file.ctime.date()

Modified today (host note being YYYY-MM-DD)

  • this.file.name == file.mtime.date()

e.g.

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - this.file.name == file.ctime.date()
```

The beauty of @ariehen’s solution is that you can have one Base and embed it in multiple notes. And if you then ever want to revise the Base, you only have to make your edits in one place. I have gone from around 25,000 Dataview queries to about 30 Bases.

Thank you man, really appreciate this.

@anon80950206 indeed, this is exactly what I am trying to do with bases.

I initially misunderstood and was in a rush, but wanted to post more. This:

Guapa and Kaleo got it, but for anyone else interested: instead of creating multiple ```base code blocks in each YYYY-MM-DD daily note, create a .base for embeds (or add these filters as different views to an existing .base; it doesn’t matter).

For example a bases-for-embedding.base with this content:

views:
  - type: table
    name: all files
  - type: table
    name: created on this day
    filters:
      and:
        - this.file.name == file.ctime.date()
  - type: table
    name: modified on this day
    filters:
      and:
        - this.file.name == file.mtime.date()

When looking at the “created on this day” or “modified on this day” views in the .base itself, nothing should show up but with these views:

![[bases-for-embedding.base#created on this day]]

![[bases-for-embedding.base#modified on this day]]

embedded in a YYYY-MM-DD daily note, you’ll get results for that day.

※ Not 100% reliable because we’re using ctime and mtime here, but should be fine for most folks.

A bit of an update:

A member in Discord asked about this, but was using MMMM DD YYYY, ddd as their daily note format which the above won’t work for.

@purple penguin shared a solution that looks good, no matter the host note’s name/format:

  • created on this day: file.ctime.date() == this.file.ctime.date()

  • modified on this day: file.mtime.date() == this.file.mtime.date()

CleanShot 2025-06-15 at 08.56.04

How can I embed a base that only includes today’s daily note?

Embed it in the day’s daily note and only reference itself?

file.name == this.file.name

Thanks! But I was hoping to embed in another note besides the daily note.

Assuming a daily note of the format YYYY-MM-DD, you could try file.name == today() e.g.

```base
views:
  - type: table
    name: today's daily
    filters:
      and:
        - file.name == today()
    order:
      - file.name
      - file.links
```

Thanks! That was what I needed!

I’m using the following filter formula to get notes:

note["updated"] && this.file.name == note["updated"].date()

It works perfectly, yet every time I open my daily note the following error pops up: failed to evaluate filter, can not find function date() on type string

What am I doing wrong?

Hi @Kaleo

Hopefully some Aces of Bases can jump in (thanks Cawlin :wink:), but a few questions that may help folks help out:

  • The goal here is to filter notes that have the same updated: (property) date/time as the daily note that the ![[embedded.base]] is in, is that correct?
  • What’s your daily note file name / format? e.g. YYYY-MM-DD?
  • What format is being written as the updated: value in notes? e.g.
    • updated: 2025-08-01
    • updated: 2025-08-01 10:16
    • updated: '2025-08-01 11:02'

By chance, do you happen to have an updated: that looks like

---
updated: '2025-08-01 10:16 Tue'
---

You’ll see failed to evaluate filter, can not find function date() on type string with something like that, but that note won’t be returned / listed in the base.

Correct! The daily note format is 2025-08-09, so exactly like you expected.

It looks like:

updated: 2025-08-09T05:18

Which is managed by GitHub - lighthousedino/obsidian-front-matter-timestamps.

EDIT: it looks like this fixes the evaluation error

note["updated"] && date(note["updated"]).format("YYYY-MM-DD") == this.file.name

Glad you got it working!

I don’t think I have any datetime Properties like 2025-08-09T05:18 (with the T) in my vault. I’ll need to look into using that format.


Also, a filter of updated == this.file.name seems to return the correct notes in a variety of formats with a quick test:

I guess the benefit here is that this format is recognized as a proper datetime value?

Wow u’re right. So simple and it works. I let my brain do too much thinking here I guess. Still getting familiar with all the possibilities!

Hi all, I’m also trying to do a dynamic embed, but cannot figure out the proper formula.

The note where I want to embedd a base is named YYYY-MM, e.g. 2026-05.

The notes to be shown in my base contain a “created” property in the Frontmatter, which looks like this:

2026-05-06 21_07_25-🔍Art Journaling, malen, zeichnen Bücher - Wissensgarten - Obsidian 1.12.7

Is there a way to do that with a dynamic filter?

Thanks, Blue

With a monthly/host note of YYYY-MM, you could give this filter a try:

created.toString().startsWith("[[" + this.file.name)

It may need to be tweaked if returning extra created entries, but it should only return notes with a created: "[[YYYY-MM... property matching the YYYY-MM of the host note.