I wanted to share this deluxe On This Day Base, for daily notes.
I call it deluxe, because it does three things (via different Views):
-
Shows notes from this day on preceding years.
-
Shows all files created on this day (but not preceding years)
-
Shows all files modified on this day (but not preceding years)
These last two items provide a fun heatmap of activity. I didn’t know if it would be useful, but I actually really like having the ability to see what I was doing on any given day in my vault.
(I posted this thread yesterday evening, but realized there was an error in the base code which I didn’t have time to fix last night, so I deleted the thread. I fixed it today and am reposting now).
Features:
-
3 Different Views in one Base.
-
100% Retroactive. Activate a template with this Base into any daily note ever, and all three Views will work for that day.
-
100% native functionality. No plugins required.
-
Works with plugins such as Calendar plugin. Haven’t tested others.
Requirements:
- Daily note date format needs to be: YYYY-MM-DD (Haven’t tried other formats)
How to use it:
IMPORTANT: Paste the Base code (below) into a template file, such as your daily note template (not a standalone base file). It can ONLY work correctly if activated by inserting via a native Obsidian template, or creating a daily note in the calendar plugin. (Templater not required, not tested, but should work.)
-
TELL IT HOW TO FIND YOUR DAILY NOTES: I use #dailynote tag to on all my daily notes, so the Base uses this tag to include and exclude daily notes from Views.
-
Make the following edits to the Base IN YOUR TEMPLATE FILE. (Don’t worry that this Base is currently showing nothing - it isn’t suppose to.)
-
You need to change this in (2) separate views:
-
On This Day > Filter > This View: Point it at your daily notes.
-
Created This Day > Filter > This View: Point it at your daily notes so that it EXCLUDES them.
-
-
Go into any daily note, and invoke the template. This will automatically fill in the correct dates in the Base.
-
That’s it. It should automatically populate the base Views with the correct daily/other notes, if your date format is correct and you told it how to find your daily notes.
Troubleshooting:
- No daily notes are showing up in the On This Day view!
- On This Day only shows daily notes from years other than the present. Do you have a daily note from this exact date on a previous year?
- No notes are showing up in the Created On This Day/Modified This Day!
- Be sure you actually had notes created on modified on that day. A good way to test the basic functionality is to invoke the template into Today’s daily note, then go create and/or modify a note at the same time, to confirm it shows up. If no notes were created or modified on a date, nothing will show up.
Credit:
-
The basic On This Day functionality was pieced together from existing snippets folks have shared over the years.
-
The ‘Created This Day’ and ‘Modified This Day’ were created with Claude.
-
Theme: Retroma
-
No AI used on this post.
```base
formulas:
on_this_day: |-
if(date(file.name).month == date(this.file.name).month, if(date(file.name).day == date(this.file.name).day, if(date(file.name).year != date(this.file.name).year,
"True", "False"), "False"), "False")
modified: file.mtime.format("hh:mm A - MMMM DD, YYYY")
created: file.ctime.format("hh:mm A - MMMM DD, YYYY")
properties:
file.name:
displayName: Day
formula.modified:
displayName: Last Edited
formula.created:
displayName: Created
views:
- type: table
name: On This Day
filters:
and:
- file.hasTag("dailynote")
- formula.on_this_day == "True"
order:
- file.name
- formula.modified
sort:
- property: file.name
direction: DESC
- property: formula.on_this_day
direction: DESC
- type: table
name: Created This Day
filters:
and:
- file.ctime.date() == date(this.file.name).date()
- '!file.hasTag("dailynote")'
order:
- file.name
- formula.created
sort:
- property: file.name
direction: ASC
- type: table
name: Modified This Day
filters:
and:
- file.mtime.date() == date(this.file.name).date()
order:
- file.name
- formula.modified
sort:
- property: file.name
direction: ASC
```



