đź“… Search by Version Date?

Often I wish to reference what I was drafting on a specific date (and time). How can I do this?

After reviewing the docs, script reference and community, I have not found a way.

Ideally I would like to query the Version date, but this doesn’t seem accessible. I’m not clear where or how versions are stored. After poking behind the curtain on Mac, I’m guessing they are stored in a SQLite database.

The Accessed date is available via Workspaces, although that provides a different context than the version date and is highly volatile time marker.

Any suggestions for how one might search for Drafts by version (editing) date?

Versions are typically used for restoration, not a searchable historical archive - hence why it is hard to find info on it and why it isn’t really common place. A typical approach might be more around the use of timestamps within drafts or separate drafts being set as archived.

The Drafts and their versions are indeed stored in a database behind the scenes.

In the scripting if you take a look at Draft.versions and Version.createdAt, you can access when a version was created, but you would have to do it with scripting such that you would have to look at any draft that could have existed in the specified time frame, and then look at each version. you could have multiple versions in a time frame, or for a particular point, you would need to “look back” to find the version closest to and before the point.

Hope that helps.

2 Likes

Thank you, @sylumer! You are always so kind and supportive. :pray:

I appreciate your direction and have started to map out a script that might accomplish this. I’ll need to continue it another day as I need to move on to other things today.