Creation Date and Dataview Dates are reset after copying/syncing :(

I’ve looked this up, but I’m still not sure what to do. I use the properties addon, which I assume edits metadata— and the “created” tab of it also resets when I copy/paste or sync.

I was only able to fix it after I entered a new property called “Date + Time” that uses Obsidian’s date format.

I’m trying to make it to where not only are note’s dates preserved, but I mostly just want the Dataview to not reset dates… I have one big table for recently created notes and their age.

I’ve tried Linter, but I’m not sure how it would help.

Here is an example:
ezgif-4-ed52a3dd14

That is to be expected when copying a file, sadly.

For that reason I wrote a plugin which updates the creation and modified properties inside Obsidian rather than using the file’s own dates:

https://obsidian.md/plugins?id=frontmatter-modified-date

It might be of use to you.

In your Dataview query you would use created rather than file.ctime

1 Like

I downloaded it, and I’m satisfied with it automatically creating a modified and created set of properties on new notes… And it seems to detect my old notes’ dates!

But I ran into another problem:
new problem

Is there anything in settings that may fix this?

Are you talking about the display of the date property being text? It’s purely cosmetic and does not matter, however it will be detected as a date/time at some point by Obsidian.

Here’s my own vault as an example:

image

So just relax and let Obsidian change how it looks whenever it gets around to it.

No I mean after I replaced it with "created” in the data tables, it gives my recent notes like -0.195817324…

Here is the data table

[!activity]+ ## Added Stuff
This view looks at the 10 newest notes in your + folder. As you process each note: add a link, add details, move them to the best folder, and delete everything that no longer sparks :sparkles:.

TABLE WITHOUT ID
 file.link as "",
 (date(today) - created).day as "Days alive"

FROM "+" and -#x/readme 

SORT created desc

LIMIT 10

Well, date(today) is the start of today, so if your note is made at any point after midnight today then yes it will show a negative number of days, since the created time is in the future compared to midnight :stuck_out_tongue:

You probably want date(now).

If you want it to be an integer instead of a number with decimal places, wrap it in floor. (None of this is to do with the plugin however, that’s all Dataview.)

floor((date(now) - created).day)

1 Like

Thanks alot. It seems to have fixed it and all is smooth and accurate.
You’re a lifesaver!

Now I just gotta figure out how to make a monthly changelog— like designed of that from a video game update— for all the notes I edited or created. Maybe there is a plugin or data table for that xD

Thanks again

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