Add timestamps and datestamps to notes w/ only core plugins

Giving this its own post with a clear title, so it’s easy to reference later.

You can automatically insert the date or time while writing a note using Obsidian’s core Templates plugin. You don’t need the Templater or Natural Language plugins.

In this case, it’s better to think of Templates as “partial” chunks of stuff you use to build up a note, rather than a “full” template of a complete note.

To create a a timestamp, create a new file in your Templates folder called “timestamp” (or “thisbenow” or whatever), and add the variable for the current time. As a dirty American with only 12 hours on a clock, mine is:

{{time:h:mm a}}

To add a timestamp anywhere you’re typing in Obsidian, activate the “insert template” command and choose the Timestamp template. Voila, you have the current time magically entered into the note.

If you’re a sophisticated aficionado of the 24-hour clock, you can just use {{time}}. (Complete formatting options available from the moments website).

Create a datestamp the same way. I like to link everything to and from my Daily Notes, so my datestamp template adds the date as a link:

[[{{date:YYYY-MM-DD - ddd MMM D}}]]

Two pro-tips I’ve stolen from elsewheres:

  1. If you use Templates a lot, make the Template command easy to get to as a keyboard shortcut or as a pinned command.

  2. If you specify the format in the template file rather than Templates settings, then the format follows the file when it synchs, and you won’t have to update settings on every device.


Is there a way to set the hotkey to insert the specific template with the time/date stamp?
(I’ve looked here )

@gabecolors, I’ve not gotten into custom hot keys, and I only use a few default ones.

I did find this plugin:

But I haven’t tried it.

1 Like

This is very interesting. Do you happen to know if there is a way to change the resulting week for example. In my company instead of using ISO weeks they have their own which is offset by 1, for example it is week 8 now and not week7. Any way I can make the result show up as w8?

Here I am 30 minutes later after going down the rabbit hole of moment and templater plugin. I was able to solve my case using templater pluging and this is the command I used to make the week show up one more than the ISO weeks.
<“YYYY”)%> WW <%“WW.d”, “P+1W”) %> with this command I get this result 2022 WW 08.3 as I desired showing week 8 instead of 7 as per ISO.