Properties, add/switch creation date with Templater

Hello everyone,

I am using the Templater Plugin and the Templates Core Plugin. When I create new Notes, I use this properties:
image
image: used properties

The Problem now is, that my existing Notes arent conform to the new Metadata system I have.
To sort my Properties, I used Linter and this worked fine. But the crucial thing I switched, was the date I created the Note to the System creation date. Sounds like theres no difference right ?
The difference is big enough to let me use half a day to search for solutions and I couldn’t find something helpfull.

The Problem:

I also probably know why this happens. Because this were Notes without any Properties, I added the new Templater Template with the Templates (! not the Templater) and Templates doesn’t know what to do with this function.

It’s just parsing the Templater function into the created Propertie.


image: Created Date function parsed inside

In some Notes I also have this showing up, but for this Problem I found the Problem.
Templater couln’t read the “{{date}}” I had before using Templater and then there was a semi Chaos. But this should hopefully also get fixed :+1:
image
image: Created Date is completly false

Here, the Sourcemode View:
image
image: Sourcmode Properties

My first idea was if there is a way do it via the Templater, but I couldnt find a working Solution, I tried using the Template and insert it with the Templater, but it stayed the same/there was no difference.

My second idea was making the function dynamic, but this would in my opinion be overkill, because we only need to gather the date one time and then it stays the same. But I tried if it could fix my Problem. Also without any better Outcome.

The third Thing I tried was creating two different Templates, one for the Templater, this one gets used when a new Note gets created and the other Template is for the Core Plugin “Templates”, which I tried to use to change the date to the wanted date, but how can I tell Templates what the System creation date is ? Because it dont understands any functions.

Just for visualization:
image
image: different Templates for Templates(1-4) and Templater(“Templater”)

Now I used half a day researching and trying to fix a small problem, but I couldn’t fix it :cry:

How can I change/add the System creation day to the created Propertie ?
Is there some Plugin I don’t know, a way I didn’t see or just a easy Solution ?

Thank you for your Time and Effort :smile:

Greetings
Tiziano

Hello Obsidian Fans,

with the start of a new day and some fresh ideas, I’ve done some more research and came to the brilliant idea to use Linter(I installed it yesterday but was a little bit overwhelmed with it :exploding_head:).

My Workaround:

I searched the wrong strings and deletet them, so I could use Linter to add the real creation date, and it worked :slight_smile:

But in the end it still was a 2 step solution, i couldn’t fix it only with Linter or anything else, there was still some manually work needed.

The question now is, are there other ways to do it better or easier. Because if you have hundreds of wrong files you dont want to do it all manually(I only had around 30 notes).

Is there a tool to remove the Properties from every single note and then add it or something which just changes them(Linter didn’t work). Or had I just been on a completly wrong path ?

Thank you for your interest.

Greetings
Tiziano

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