"On this day" for Daily Notes

I’ve been doing my primary journaling in Day One for years, and one of its best features is “On This Day” where it shows you other entries you created on the same month and date for all the past years you’ve kept a journal. I really wanted to have the same thing in Obsidian, so I added a section to my “Daily Note Template” that embeds a query for the date in question.

The section looks like this, but the embedded query does most of the heavy lifting:

---
## On This Day
```query
file:"{{date:-MM-DD}}"
```

The result is something like this:

I’d really like to use the Daily Notes in Obsidian for my principal journaling, for linking my thinking and whatnot, but I’m very attached to Day One’s book printing service that allows me to print physical volumes of my journals after every year. If anyone knows a convenient way to automate import of Obsidian Daily Notes into Day One, I sure would appreciate it!

15 Likes

that’s a cool idea!

I just added another layer to this:

```query
file:{{date:MM.DD}} -{{date:YYYY}}
```

(specifically the -{{date:YYYY}})

This will remove the current year’s note (in other words, the note you’re currently in).

Side note: @ianlhayes How did you get the code block to work inside the code block here on the forum? Mine keeps terminating on the first set of tick marks.

Thank you, this tidies up my dailies tremendously! As far as getting a code block into a code block, I think trial and error was how I handled it.

Looks like four presses of the spacebar works to declare a code block on the forum. For tidiness, I did four spaces at the beginning of each line.

Spaces… Dammit. I even knew that. Thanks.

Great idea by the way.

should add “()” in query :

eg:
file:({{date:MM.DD}} -{{date:YYYY}})

Thanks.

FWIW I use dataview now for this. Anyone who is interested:

### On This Day
```dataview
table file.mtime as LastEdit
from ""
where contains(file.name, "05.07") and !contains(file.name, "2021")
```
1 Like

Thank you for this! I’m still trying to wrap my head around the different plugins I need to enable in order to have the dates automatically entered. What methods are you using to pull the current date, etc. into dataview?

1 Like

Okay, it turns out I have a problem. My search query doesn’t find other entries from the same day that I have imported in the past, e.g. I have multiple entries from 2019-05-24 that are listed as 2019-05-24a, 2019-05-24b, etc. Is there a way I can word my query to capture possible suffixes as well? Right now my query only finds the numeric entries and so my embedded query only shows one entry per day.

1 Like