Is it possible to change the creation date of a note?

Things I have tried

I would assume it should be possible via editing the front-matter but how?..


for me - your question is inappropriate - therefore I flagged it.
I don’t assume you have bad intentions, but the manipulation of the creation date of a file opens doors for abuse.

Kind regards

To be honest, I don’t think this is an inappropriate but rather legitimate question. Actually I have already asked myself this question a couple of times before. In my case, because I have moved several thousands of files (that I have exported to markdown before) from another app to obsidian. Obsidian - as far as I understand - reads them as created the day I’ve moved them to my vault. This is not really a problem - but on the other hand it would be helpful sometimes if I could see that a specific note had been written by myself, let’s say, in August 2009… Thus I could still see in what circumstances this special thought came to my mind originally, how my thoughts about a specific topic developed over the years and so on.

In yaml, I can add “created: 20100817”, for example, which at least is a reminder to myself. But I think this is no information that is accurately read by obsidian, am I right?


Yes you are right. It isn’t reliable at the moment. There is a feature request for creation date to be preserved.

The creation data is an intrinsic meta data of a file. There are other intrinsic file meta data, depending on the file type, e.g. location for image files.
You can use these meta data, e.g. all images made at certain place or at a specific date, but you don’t have to use them. You can manipulate these data - but why?
A plain text file, isn’t an image file. The creation date says little to nothing about the file content, therefore it isn’t relevant for the workflow.
But - in general - it could be used for abuse, e.g. if you date a file to the past and claim rights for the content.
Also - in general - it’s absolutely bad style to manipulate these file meta data and that just because there is no need.
If you want your own file meta data, than - as you mentioned - YAML-Frontmatter is first and best choice - my opinion.
YAML has nothing to do with Obsidian, if you leave Obsidian you take with you - your files, their content and their YAML meta data.
In Obsidian there is the Dataview plugin to use the YAML meta data for your workflow - but in any other plain text file based systems you will find support for YAML, because YAML is YAML.

1 Like

I’m not sure what you mean by abuse… Abuse who? How can I abuse anyone by changing my note creation date?

No, you won’t abuse nobody. But - in general - the manipulation of the creation date can be used for abuse. You can’t do it with Obsidian, but you can do it. And therefore nobody should publish a “how to”.

But the more concrete reason is, there is no need to do this. If you describe what you want to achieve there will be a solution.

I created separate notes that are blog are blog posts, published on different dates. But now I realized I’ve mixed up the date order and now they do not show up the correct order of published date :man_shrugging:

as innocent as that…

If you’re on a Mac …



“creation date” is “creation date” and “published date” is “published date”. For your workflow, why care for the “creation date” of a file, what matters is the “published date” of a certain content.
And I am pretty sure, if not yet, but it will come, there are other data which are important for your workflow, e. g. where did you publish it.
You can use meta data to organize your files. The meta data is written in YAML.

published: 2022-01-16

Don’t use “publish” because it is an Obsidian specific YAML key.

With the Dataview plugin you can handle your files.

LIST published
WHERE published
SORT published ASC

It’s not me who cares; it’s Obsidian.

When I order the notes in order of creation date, they do not show up in correct order because I’ve made a small mistake when importing them into Obsidian. Now I simply need to adjust the creation date of one note so that it displays in the right order.

Are you on a Windows-System? Then you could use PowerShell. But if you are not familiar with it, it’s not as easy.
Would it help, if I send you a md-file with the date and time you wish?

is this anything different from the front-matter solution you suggested above? I understand that already, but if it is possible to create an md file with certain date embedded I’d appreciate if you could tell me how :v:

To be fair, no court on earth would accept the OS creation date as legitimate evidence for purposes of IP law given how easily it can be manipulated. Hell, many OSs provide intrinsic API functions for altering those values.

Eg in Windows

BOOL SetFileTime(
  [in]           HANDLE         hFile,
  [in, optional] const FILETIME *lpCreationTime,
  [in, optional] const FILETIME *lpLastAccessTime,
  [in, optional] const FILETIME *lpLastWriteTime

@yalcin, I do think you’d get better answers asking this on one of the StackExchange boards such as SuperUser or SysAdmin though.

1 Like

“is this anything different from the front-matter solution you suggested above?”

It’s totally different. Files and their attributes are - beyond application specific stuff - defined by your Operating System.
These attributes are nothing more than meta data and it’s ok to use them for your workflow. BUT, most applications lack an appropriate interface to handle them.
The Dataview plugin has a file object with so called implicit fields, one of them is “file.ctime” or “file.cday” for the creation date of a md-file. But - with Dataview you can read these data - but you can not write these data.

“but if it is possible to create an md file with certain date embedded”

Sorry, but I see no way to manipulate these file attributes from inside Obsidian - and that’s good so, because of security risks.

What I don’t understand, why not use YAML for your purpose? You can read, write, whatever you want - manually or automatically. You can - if you want - build a fully file based, data base system.

AND most important - YAML is - as well as markdown - future proof and independent of a specific application.

1 Like

First and foremost: I appreciate your interest and support on this @Amolip :slight_smile:

I sure can use YAML but even if I do, I cannot make the file in question show in Obsidian’s folder view in the correct date order. I understand I can use the same YAML structure for other related notes (and maybe sort accordingly in dataview) but that is a lot of extra work to do. I am trying to simplify my file workflow & file structure. I don’t need another data base system :man_shrugging:
Thanks again, your thoughts are very welcome…

I sure can use YAML but even if I do, I cannot make the file in question show in Obsidian’s folder view in the correct date order.

Changing the file last modified date and time is trivial. See man touch and the -t option. I’ve had similar problems when restoring files by just copying them off disk. Every file creation & modification time is set by the OS to the time of the copy, not the original timestamp.

The bigger challenge is to determine what timestamp to use. If you just want to change the modification time on a bunch of files to a single arbitrary date, that’s simple enough. If you want to change each file to the actual date and time it was created, you’ll have to be able to derive that information from somewhere. If you have the actual creation time in the metadata, you could extract that and use touch to modify the actual file timestamp.

One caution is that this might play havoc with any synchronization you’re doing. You might want to disable sync until you’re done modifying the timestamps.

Ok, so I think the question asked was the wrong question…

What you really wanted to know is… how do I sort files in a specific order?

Maybe if you ask that, you can avoid the grammar nazis attacking you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.