Adding the date to each note

Hello,

A question,
What would be the easiest way to automatically add the date to each new Note?

Cristian

2 Likes

You can use the Template plugin. The {{date}} placeholder is expanded upon insertion.

Or you can use some third-part app that does text expansion, such as Keyboard Maestro, Alfred or Espanso.

None of the methods is fully automatic. You still need to manually insert the template or trigger a shortcut.

I believe I’ll write such a plugin. I really need it.

I was thinking about adding it as metadata such as:

---
title: Metadata about what we write is really important
date: 10/11/2020
modified: 21/11/2020
---

All the contents of the note

But I ignore if there is some standard way of doing this, or what are good names for the dates for instance.

Any ideas on this?

2 Likes

Obsidian supports YAML frontmatter, so I think it’s a good choice. As for the plug-in, that’s out of my league, but I’ll probably use it when someone makes it :sweat_smile:

1 Like

In the end, I wrote the functionality in a plugin
you can find it in Obsidian, it’s called Markdown Prettifier

it allows you to setup a template and will add or modify the date each time you ‘prettify’ your note.

1 Like

Awesome. I’m on my way! :smiley:

Thanks!

I’ve used only a small portion of its features yet, but it’s working great. Thanks again.

1 Like

The “daily notes” core plugin adds some of that functionality AND Templates allows for some date formatting of your choosing AND the Zettelkasten plugin can add a file title with the full date down to the hours and minute if that is of use to you.

I have not had much use for that at the moment but it was nice to see how many options are available for that.