# Best way to add CREATION date to notes?

**URL:** <https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856>\
**Category:** Tips\
**Created:** [August 27, 2025, 9:49am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856 "2025-08-27T09:49:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 27, 2025, 9:49am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/1 "2025-08-27T09:49:13Z")

</div>

I am aware that individual files contain their creation date in their filenames. In addition to that, I am looking at adding a “creation” metadata to the notes – both file level roam nodes, and heading/subheading level roam notes.

What is the best way to go about doing that?

- adding `#+creation:` to files? I don’t think that’s good, because the `#+`properties are filelevel properties that relate to exporting backends, afaik.
- adding `:CREATION:`property to the property drawers of each and every roam node that gets created? This would both include the file level roam nodes and subheading/heading level roam nodes

* * *

Looking at the forum posts, I see:

1. [User contributed Tricks · org-roam/org-roam Wiki · GitHub](https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#timestamp-on-save-alanz) –\> this one seems to insert a non-standard (ie, neither is a `#+` nor a drawer property) `Time-stamp`metadata to the file. But what about the subheading/heading roam nodes?
2. [Update a field (#+LAST\_MODIFIED: ) at save - #18 by kevindb159](https://org-roam.discourse.group/t/update-a-field-last-modified-at-save/321/18) –\> this one inserts `#+modified` using `org time-stamp`functionalities. Again, what about the subheading/heading roam nodes&notes?

* * *

Concerns:

1. getting it in a format that is properly working with the greater org ecosystem
2. getting other roam-tools, like org-roam-ui to perhaps make sense of it and use it

---

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 27, 2025, 9:56am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/2 "2025-08-27T09:56:49Z")

</div>

I guess the easiest way to go about doing that would be changing the `org-id-method`to `ts` value. That way, the UUIDs of ALL your roam nodes (both file level and subheading level) will automatically encode the UUID creation date.

* * *

But again, I don’t like changing an orgmode default setting (org-id-method) globally just ‘cuz I am using org-roam.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [August 27, 2025, 10:25am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/3 "2025-08-27T10:25:48Z")

</div>

> [@ChuckSneed](#):
>
> But again, I don’t like changing an orgmode default setting (org-id-method) globally just ‘cuz I am using org-roam

I do not see a problem. It is a customizing variable by `org-id`, which is part of the upstream. Where does your concern come from?

---

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 27, 2025, 10:27am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/4 "2025-08-27T10:27:24Z")

</div>

> [@nobiot](#):
>
> It is a customizing variable by `org-id`, which is part of the upstream. Where does your concern come from?

Other tools might not (whether now or in the future) work well with a somewhat more esoteric/non-default choice for org-id-method.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [August 27, 2025, 10:30am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/5 "2025-08-27T10:30:04Z")

</div>

@ChuckSneed If you prefer to keep org-id default, and you want to avoid the `#+` keyword, then… I think you have your own conclusion, don’t you? Use the property drawer.

---

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 27, 2025, 10:31am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/6 "2025-08-27T10:31:41Z")

</div>

> [@nobiot](#):
>
> I think you have your own conclusion, don’t you? Use the property drawer.

I do, but I post here in this forum to see others’ opinions. It is not just me reaching my own conclusion on my own. Why have a forum then?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [August 27, 2025, 10:57am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/7 "2025-08-27T10:57:38Z")

</div>

> [@ChuckSneed](#):
>
> What is the best way to go about doing that?

I agree with you about open exchange in a forum. My opinion about the “best way” is the one you find. If you are seeking others’ opinions, I’d suggest perhaps you could phrase your opening question differently, and directly ask for open opinions as you did now. This is only my view and you can agree or disagree with me.

---

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 27, 2025, 10:59am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/8 "2025-08-27T10:59:04Z")

</div>

> [@nobiot](#):
>
> I’d suggest perhaps you could phrase your opening question differently, and directly ask for open opinions as you did now.

Why? Best way can be subjective, and I was expecting that to be so. Anyways.. this is offtopic.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [August 27, 2025, 11:06am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/9 "2025-08-27T11:06:18Z")

</div>

No worries. I see the “best way” you are asking is one’s own best way (eg nobiot’s best way he has found so far) not a way you ChuckSneed may find best.

My best way so far is:

1. File nodes only (headings are not nodes)
2. File name starts with a date stamp (up to minutes) but keep a title in the file name too
3. Use Org ID as time stamp too (because I find UUID esthetically less appealing than a time stamp)
4. I also add a file meta data with the `time-stamp` as described in the forum and Wiki.

There is also another reason why I prefer timestamps to UUID. I can use timestamps in my physical notes to refer to notes (from/to digital ones). It is not easy for my human eyes to use UUID as a reference key.

---

<div class="post-metadata">

**Author:** ![dmg](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dmg](https://org-roam.discourse.group/u/dmg)\
**Post date:** [August 28, 2025, 6:39pm UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/10 "2025-08-28T18:39:05Z")

</div>

This might be useful to you. I add it to ALL headings in the org-roam nodes

```auto
(defun dmg-org-add-created-to-all-headings (&optional p)
  "Add a CREATED property with the current date to every heading without it."
  (interactive "P")
  (let ((date (if p
                  (format-time-string "%Y-%m-%d %T" (org-read-date nil t))
                (format-time-string "%Y-%m-%d %T"))))
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward org-heading-regexp nil t)
        (unless (org-entry-get nil "CREATED")
          (org-entry-put nil "CREATED" date))))))

```

and this is how I call it. If I want to add it to no-roam files I check DMG-ADD-CREATED property.

the function also adds an ID if the file is in the roam directory and it does not already have at least one ID.

```auto
(defun dmg-org-add-properties-before-save ()
  "Add CREATED property to headings and ID/TRIGGER to the file before saving.

  CREATED is added if org-roam file and not explicitly disabling it

                   if not org-roam file, then explicitly enabling it

  ID gets added if org-roam and first header does not have an id

  Any errors encountered are caught and reported, but do not abort the save."
  (condition-case err
      (let* (
            (file-props (dmg-org-roam-file-properties))
            (is-org-roam (org-roam-file-p))

            (created-prop (dmg-org-roam-file-property "DMG-ADD-CREATED" file-props))
            (explicit-add-created (and created-prop
                                       (string= created-prop "yes")))
            (add-created (cond
                          (created-prop explicit-add-created)
                          (is-org-roam (not created-prop))
                          ))
            (id-prop (dmg-org-roam-file-property "ID" file-props))
            (first-heading-id (dmg-org-first-heading-get-id))

            (add-file-id (and is-org-roam
                              (not id-prop)
                              (not first-heading-id)))
            )
        ;; 
      (when add-created
        (dmg-org-add-created-to-all-headings))
      (when add-file-id
        (dmg-org-file-add-id))
        )
    (error (message "Error adding properties: %s" (error-message-string err)))))

(add-hook 'before-save-hook 'dmg-org-add-properties-before-save)

```

---

<div class="post-metadata">

**Author:** ![ChuckSneed](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/chucksneed/32/1379_2.png) [@ChuckSneed](https://org-roam.discourse.group/u/ChuckSneed)\
**Post date:** [August 28, 2025, 6:45pm UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/11 "2025-08-28T18:45:03Z")

</div>

Thanks @dmg . For the record here’s also what I’ve been tinkering with:

```lisp
(org-roam-capture-templates
   '(("d" "default" plain "%?"
      :target (file+head "pages/%<%Y%m%dT%H%M%S>--${slug}.org"
						 ":PROPERTIES:
:ID: %(org-id-new)
:CREATED: [%<%Y-%m-%d %a %H:%M>]
:END:
#+title: ${title}
#+filetags: :pages:
")
      :unnarrowed t)))

```

and

```lisp
(org-roam-dailies-capture-templates
   '(("d" "default daily" entry
      "* %<%H:%M> %?
:PROPERTIES:
:ID: %(org-id-new)
:CREATED: [%<%Y-%m-%d %a %H:%M>]
:END:
"
      :if-new (file+head "%<%Y-%m-%d>.org"
						 ":PROPERTIES:
:CREATED: [%<%Y-%m-%d %a %H:%M>]
:END:
#+title: %<%Y-%m-%d>
#+filetags: :journals:%<%Y-%m-%d>
")
      :unnarrowed t)))

```

This way, both **file nodes** and **heading nodes** _always_ have folllowing two properties in their `:PROPERTIES:` drawers:

1. UUID (which is the default behavior)
2. Creation date (which is my addition)

---

<div class="post-metadata">

**Author:** ![dmg](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dmg](https://org-roam.discourse.group/u/dmg)\
**Post date:** [August 28, 2025, 6:47pm UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/12 "2025-08-28T18:47:46Z")

</div>

Yes, the templates are useful.

I create a lot of headings by hand. BUt I don’t want all headings to be org-roam nodes. It clutters searching for headings.

Usually, when I am editing a roam file, when I am adding heading. if I think I am likely going to visit it directly in the future (e.g. I think I will search for it), I call org-id-get-create manually to add the ID to convert it into an org-roam node.

---

<div class="post-metadata">

**Author:** ![doubleloop](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/doubleloop/32/99_2.png) [@doubleloop](https://org-roam.discourse.group/u/doubleloop)\
**Post date:** [August 30, 2025, 11:38am UTC](https://org-roam.discourse.group/t/best-way-to-add-creation-date-to-notes/3856/13 "2025-08-30T11:38:31Z")

</div>

What about [GitHub - tefkah/org-roam-timestamps: Add modified and creation timestamps to the org-roam property drawer](https://github.com/tefkah/org-roam-timestamps) ?
