Automatically update last modified date in note

In case someone is still interested in realising the automatic update of last modified date in the current note like the post here, here is my solution using the Dateview plugin.

  1. Install Dateview plugin in Community plugins. Enable it.
  2. Enable the JavaScripts Queries as well as the Inline JavaScripts Queries in the plugin’s settings.
  3. Now you just need to put this line wherever you want to have the modified date displayed:
    `$= dv.current().file.mtime`

For demonstration, here is how I use this trick:

> [!info]- Metadata
> - Created::  `$= dv.current().file.ctime`
> - Updated::  `$= dv.current().file.mtime`

Hope it helps!


Nice, the only thing is that this does not work on the frontmatter section :c

That’s great. How would you modify it for format the last modified output as: YYYY-MM-DD?

Is there any trick that could put this in the frontmatter?