You can use the Natural Language Dates plugin with date format YYYYMMDDTHH:mm:ss
. You press @
and choose today and it adds the timestamp at cursor position.
In Obsidian you can use Javascript – easiest to use a Templater snippet.
Again, this snippet adds a timestamp at cursor position:
<%*
let timestamp = moment().format("YYYYMMDDTHHmmss");
tR += `^${timestamp}`;
%>
Add your template or snippet folder in Templater settings and register the template for a hot key shortcut in Templater.
- That’s TemplateR with an R at the end.
You can remove the ^
before ${timestamp}
. I only added it for cosmetic effect, not so much for block id creating reasons, although this can be handy (but too many block id’s are taxing on the metadatacache in the long run).
You can use small html tags for cosmetics:
<%*
let timestamp = moment().format("YYYYMMDDTHHmmss");
tR += `<small>${timestamp}</small>`;
%>
Differences:
In Reading Mode, the small tagged version shows, the block-id version doesn’t, which is a plus.
You can change the date-time format any way you like. You can add hyphens in the time-date format: makes it easier to query them in the search modal (with regex).
But as I said, I’d rather like a plugin solution, similar to what the Remember Cursor Position plugin does: writes stuff into a data.json file. If I wanted something like this for myself, I’d rather not clutter up my notes with these timestamps and I may miss adding them from time to time, which means relying on finding anything based on these would be impossible for me.
So as I said, keep looking for the plugins mentioned.
One of them:
The other was also named Comments or something. No idea what they do and how likely they are to break…anything…