📚 node [[adding timestamps to org roam notes]]

Adding timestamps to org-roam notes

Adding timestamps at note creation

From Zaeph's config, include this in your capture template:

:head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"

Modifying timestamps on save

I would prefer to do this on org-roam files only. See Update a field (#+LASTMODIFIED: ) at save - How To - Org-roam.

Didn't work for me straight off though.

(setq time-stamp-active t
      time-stamp-start "#\\+LAST_MODIFIED:[ \t]*"
      time-stamp-end "$"
      time-stamp-format "\[%04y-%02m-%02d %3a %02H:%02M\]")
(add-hook 'before-save-hook 'time-stamp nil)
📖 stoas
⥱ context