Why Manage Creation and Modification Times Yourself?

Why Manage Creation and Modification Times Yourself?

This article is divided into three sections:

  • Why? — Reasons to manage time metadata manually
  • What For? — Practical uses of time metadata
  • How? — Easy implementation methods

Why?

Why manage creation/modification times yourself?
— Because file system timestamps are unreliable.

As we know, file systems track Created and Modified timestamps:


However, these timestamps are easily altered and often inaccurate.

For example:

  • Syncing notes across devices may overwrite timestamps.
  • Batch editing notes (e.g., renaming properties or tags) resets all affected files’ Modified time to the batch operation’s timestamp:

This makes features like “recently modified notes” meaningless if relying on system timestamps.


What For?

Accurate time metadata enables:

All these require correct time metadata. Inaccurate timestamps lead to misleading results.

Screenshots achieved using Dataview and Components.


How?

Basic Implementation

For creation time:

  1. Add a note property via Add file property:

  2. Name it create_date with Date & Time type:
    image

  3. Set to current time:

For modification time:
Repeat the steps to create a modified_date property and update it manually when editing. :smile:

By storing timestamps in note metadata (Frontmatter), you gain reliable control.


Automation

If manual updates feel tedious - no worry, Obsidian plugins can automate everything.

Auto Creation Time

Use Templater with this template:

<%*
const createDate = tp.file.creation_date("YYYY-MM-DDTHH:mm");
-%>
---
title: <% tp.file.title %>
create_date: <% createDate %>
modified_date: <% createDate %>
aliases:
tags:
---
# <% tp.file.title %>

This auto-populates create_date on note creation:

Auto Modification Time

Install plugins like Update Time Updater or Linter:

For better control, bind the update command to Ctrl+S using Commander:

This updates modified_date only when manually saving (avoids accidental changes).

:bulb: Linter Plugin also offers YAML Timestamp rules for automated updates.


Conclusion

This guide explains why and how to manage note timestamps manually. Key takeaways:

  • Essential for time-based note tracking/statistics.
  • Automation via plugins eliminates manual effort.
  • Only necessary if you care about temporal analytics — otherwise, ignore it!

Thanks for reading! :dart:

4 Likes

Linking:

Because that patch is not going to happen any time soon…
…I am using DVJs (Dataview plugin)/DCJsx (Datacore plugin) single queries to get the currently used OS:

...
    // Platform detection
    const isWindows = navigator.platform.toLowerCase().includes('win');
    console.log(`Platform detected: ${navigator.platform} (${isWindows ? "Windows" : "Linux/Other"})`);
...

…then based on where I’m at the results will be output based on ‘mtime’ on Windows and ‘date modified’ on Linux. Meaning I can update links on Windows to reflect on my queries and on Linux I do Python search and replaces.